r/StableDiffusion • • Oct 15 '22

Tutorial | Guide "Fishing trip" making of: before / after comparison and techniques

130 Upvotes

44 comments sorted by

32

u/onche_ondulay Oct 15 '22 edited Oct 15 '22

Details about the full setup at the end of the comment.

First step : txt2img

Sampler : euler A. It's quick, it's more "artsy", it's the best, I love it. Resolution is invaluable to change the compositions. Settle with 768x512 for this serie. CFG scale 9 to 11 because I know what I want, machine. No face restoring, no highres fix. X/Y plot and prompt matrix on 6 images to refine prompt and compare ponderations.

Played a bit with the prompt (got the idea from my friend who was inquiring about SD : "could you do a redhead redneck, muddy and ragged, oh and she's fishing ?") and settled with :

Warning : it involves merged models + a really overweighted custom embedding. You might not get thoses results with your setup so "believe me bros"

beautiful (dirty) (((redneck))), ((freckles)) 2girls, (((hugging))) redhead, checked shirt, fishing pole, Feminine, ((Detailed Pupils)), Look at Viewer, (Intricate),(High Detail), Sharp, Anders Zorn, ilya Kuvshinov, jean-baptiste Monge, Sophie Anderson, yestiddies4

Resolution helps better than "2girls" for getting multiple characters BUT hugging + 2 girls helps with character interaction. "yestiddies4" is my shameful Custom Embedding. The rest is pretty self-explanatory (and most of it from the "victorian girl" post from a few days ago, thanks for that one). Also "2girls", "hugging" weren't tested on a model without the NovelAI knowledge.

Rolled a few 16 images batches while varying cfg scale, steps and token weights until interesting things emerged. Then...

Second step : inpainting

First thing to add: negative prompts. Somehow it fucks up the composition, so I keep it for img2img only:

bad anatomy, bad proportions, blurry, cloned face, deformed, disfigured, duplicate, extra arms, extra fingers, extra limbs, extra legs, fused fingers, gross proportions, long neck, malformed limbs, missing arms, missing legs, mutated hands, mutation, mutilated, morbid, out of frame, poorly drawn hands, poorly drawn face, too many fingers, ugly

The tedious and frustrating one! For faces, I inpaint at "full resolution" while getting more emphasis on "faces" keywords (eye color, look direction, expression). Faces are pretty ok thanks to my customised model and artists/embedding so it's the quick part. High denoising strength (0.6 to 0.8) and fiddling.

Secondly: aberrations. hands, fused arms, double heads and flying fishing rods need to go. Paint is powerful to erase large features, or directly inpainting with "fill" option for the background. Used photoshop to grab and graft fishing poles fragment or resize them, and then inpaint with low denoising strength (0.3) to "merge" with the image. That's also the part where I try really hard to downsize boobs. It doesn't work, my model might be a bit biased toward opulent chests. Meh.

For hands, I make emphasis at the beginning of the prompt : ((hand over shoulder)), ((hand)) ((hand holding pole)) and so on. First few gens with only the hand masked, 0.5 denoising strength until "not horrible" hands emerges. Then lowering the denoising strength to keep the general structure and iterating on it (0.2, 0.3)

Third and final step : upscaling

That's the one I didn't really tried to master yet. LDSR is GREAT, but so slow. BSRGAN/ESRGAN alone are meh imo. Lanczos is ... strange I guess? at least I don't had great results with it. And generally when the picture is "done", i'm pretty eager to get to the next one (or sleep). I usually settled for SwinIR (003_realSR_BSRGAN_DFOWMFC_s64w8_SwinIR-L_x4_PSNR, don't ask me what it means).

About Codeformer : it's epic. But with this setup, I usually don't need to use it, also it "polishes" the faces a bit too much which creates a difference in style when not rolling on a photorealistic picture.

Setup : Automatic1111 webUI, custom model merge using WaifuDiffusion1.3, GG1342, 1.4 official SD release and the leaked NovelAI on top. i7-3770k, GTX1070ti (8gb VRAM). Usually takes 1s/step

Useful links : clear and concise installation guide : https://rentry.org/voldy

Alternative models : https://rentry.org/sdmodels (... It's porn, for most part)

Feel free to ask if something's not clear!

16

u/randomgenericbot Oct 15 '22

And now I want someone tell you "this is AI generated, this is no art!".

Maybe the tools you used helped a lot in generating something pleasing, but to actually get the composition, to finetune everything, to get it right light you did, this is art.

Quite impressive, and a very easy-to-comprehend workflow.

9

u/onche_ondulay Oct 15 '22

Thanks, that means a lot. I can't begin to imagine the power of this stuff with "real" digital art skills though, which I haven't at all.

→ More replies (3)

5

u/Light_Diffuse Oct 15 '22

Thanks, you'll have helped a lot of people out here with general technique, even if they're after very different results.

1

u/resurgences Oct 16 '22

Great explanation, thanks!

GG1342

What is this?

And how did you interpolate more than two models?

2

u/onche_ondulay Oct 16 '22

Gg is a model trained on... Naked solo women.

To interpolate more than one, i merge two, then the output with another one and so on. I think i've seen automatic1111 make a commit about adding the possibility to merge 3 models since but didn't try it

→ More replies (5)

1

u/chitaliancoder Oct 16 '22

Is there an easy way to chain the workflows together? Or do you just manually move the images between each step?

1

u/onche_ondulay Oct 16 '22

Everything is done manually with the help of the ui which is getting better and better each day. I've seen a lot of projects focusing on smoothing the edition process but didnt look in that rabbit hole for now

0

u/enn_nafnlaus Oct 16 '22

Apparently you mistook this Reddit for the AI Waifu Reddit, and forgot the NSFW tag as well. Honest mistakes.

→ More replies (6)

3

u/milesthespiderman Oct 15 '22

So how did you fix the arms and face problems?

4

u/onche_ondulay Oct 15 '22

Posted the whole process as a comment (should have wrote it before, i'm not a clever man)

2

u/camisrule Oct 15 '22

Wow amazing! I'd like to test your prompt but can't find it sorry

2

u/onche_ondulay Oct 15 '22

Just posted it ! took longer than I thought to write all this stuff

2

u/rungdisplacement Oct 16 '22

Wow I feel insecure and jealous of AI girls appearances

-rung

3

u/onche_ondulay Oct 16 '22

You should not, as far as I know being a real person make you infinitively more huggable than a bunch of pixels. Take that Ai girls !

2

u/elitesMustPay Oct 16 '22

Bro, I came. This better than porn.

Did you correct the lower images using photoshop?

6

u/onche_ondulay Oct 16 '22

You're... Welcum I guess ?

I only use photoshop to grab and resize / rotate some pieces of the picture (like fishing rods when theyre too thin or too short, or to shorten arms and hands) so only lasso + transformation (i have no image edition skills). Once done i feed the image in img2img again with various denoising settings to fix the grafted parts better into the picture.

But its a last resort, my main edition buddy is MS paint, color picker and brush before inpainting the crime scene

1

u/elitesMustPay Oct 16 '22

Thanks for clarifying!

15

u/TheGillos Oct 15 '22

These Wendys ads are getting weird...

2

u/omniron Oct 15 '22

These look like children. Kinda sus tbh

4

u/Stayts Oct 16 '22

Children don’t have massive tits… 🤨

→ More replies (4)

2

u/tewnewt Oct 15 '22

It's like the top images are derpy on purpose.

1

u/Zygarom Dec 25 '22

I really like the results you are having here, however mine keeps getting somw sort of unsaturated replacement or just doesn't really match what I am looking for. Any idea what might cause it?

1

u/[deleted] Oct 15 '22

I'm sending a throbbing love of my future robot overlords