Skip to content

112 comments

This is excellent!

I've just started messing around with SD and this answers a bunch of questions.

57 points

You can also test out more passes and sometimes you will get something interesting but the time cost vs quality goes down fast.

Update: Made a part II

18 points

What sampler did you use, i presume euler-a since it looks like lower steps produce better results?

40 points

Yes its euler-a!

21 points

On my experience, It's awful for comparing different number of steps. Other samples set for consistent image after somewhat 30-60 steps. Euler-a continues to oscillate weirdly till at least 250 (didn't try more)

2 points

euler-a I find produces the most reliable results, not necessarily the best but the fastest results for my workflow.

But I like to do one final img2img at a high step with heun towards the end of my process, heun can sometimes be significantly higher quality but it's not very consistent.

15 points

I guess what to take from this is, less is more? the middle-upper-left seems to show the most interesting results...

21 points

I believe it depends on the sampler a lot, but in this case yeah it looks like 20-40 steps and 5-15 scale produce the most interesting results which is kinda subjective also.

20 points

It depends a lot a lot. DDIM is super fast but almost doesn't improve after 10 steps. k_dpm_2_a just keeps improving the image quality indefinitely but needs at least 50-90 steps, and if it makes a semantic mistake it will never fix it. k_euler_a never reaches the same image quality but will keep fixing semantic mistakes and try different things.

15 points

It all depends on what you are trying to accomplish. There is no wrong or wright here, only the most efficient and reproducible way to get to the end result you had in mind.

5 points

I wonder if CFG scale can be variable. Start out high "listen to me" and drop to "make it look good".

4 points

There is a patch in the lstein patch tracker that lets you vary CFG each step.

4 points

These trucks look better as trucks, but are less like a generic soda can, maybe you get such results on higher steps if we weight the soda can prompt less?

3 points

yeah, less is more, sometimes.

I find this chart to be well intended but not that useful for my purposes. one strange thing is that neither dimension is at 512 pixels, which is the default for a big reason: 512 pixels square is what the network was trained on.

I'm also not entirely sure what the CFG is here. what's the nominal 100%, 20 cfg? scaling along with dreamstudio beta? unclear.

there are plenty of prompts that produce interesting results at very low cfg, or very high cfg, or very low steps, or specific intermediate number of steps, and so forth. attempting to generalize as this chart does is a doomed mission because they're just is no generalization for a 500+ dimension construct like stable diffusion that fits into a two-dimensional grid.

2 points

I love how at 75 steps, the AI is like :

-"Ok, here is a truck." at scale 5

-"Fuck the truck ! And you know what? I will make the trailer fly !!!" from 6 to 10

-And goes back to "Here, a truck."

19 points

What is scale exactly?

10 points

I’m not sure exactly but I read someone described it as:

  • 0-5: do whatever you want computer
  • 6-10: lets collaborate
  • 11-15: do whatever I write you darn computer

Anything over 16 is like furiously shaking the computer and slapping its face

32 points

Scale is how closely an image matches your prompt and deviates from the original image that the seed uses to start with. Every seed starts with a random image to give everything shape and form, if you set your scale to 1.0, you can usually see a heavy influence of this initial image in your outcome. The higher you set it, the more it tries to match your prompt and stray away from the base layer composition/colors of the seed.

If you look at scale 0, steps 50, you can see the original image, because at scale 0 it is ignoring the prompt. As the scale moves up along step 50, you can see how it is forming the truck using colors and elements found in this base image.

5 points

Ok thanks, was confusing me because in my collab I have scale and strength (for init but also set to zero when no init ) I wasn't sure which was influencing it more so I usually tweak both, which are both CFG I believe. Going to have a mess around right now see what setting strength to 0 and changing scale does. Ahh its coded strength_set_to_zero if no init so in that case I guess scale dominates..but then why does it change things anyway when I change strength there..surely it should stay the same. I'll ask on their discord..

Edit: ok experiment done it is scale that determines it. I guess scale is termed strength when an init is used.

1 points

if we're working on a scale of 1 to 20, you could regard the bottom of the scale as dreaming and the top of the scale as wide awake.

3 points

How is it different to CFG and strength then? So far I've seen CFG, Scale and Strength.

My collab uses strength and scale dreamstudio uses CFG only.

1 points

What is not shown here is that 1 steps can actually drastically change the output. I tried to get a " 18 year old teen boy wearing trunks, summer, day... " style prompt, and often just one step more could result the subject from facing the camera to having a back against it. And regardless of what tricks I tried to pull, I couldn't force a pose in the text2img part of workflow.

I know that this is because the base material has plenty of amazon/alibaba/wish... etc china manufacturers stock images that mess with the system.

Those product pictures for example can lead to pieces of clothing or so floating in the air instead of being on the subject.

9 points

scale 0 is really like hey AI what you dreaming about?

6 points

Mostly people inside ikea or bicycles inside a hangar, then mostly just about wood

3 points

You should img2img those and see how detailed you can get.

Prompts are nice but you know what you want.

not knowing what you want and letting the AI guide you can be a very interesting journey.

The AI is the dreamer but then you are the glasses that shape the reality of what it's trying to see.

5 points

What does scale actually do?

2 points

It's a slider between the AI trying to be creative or giving you exactly what you want in your prompt even if the end result is horribly cursed. The workable range is usually 5 to 15 but it depends on a lot of other settings to. cfg with text to image and cfg with img2img is quite different because of the init init strength parameter.

You can also use a negative cfg and it will try to give you the opposite of your prompt.

4 points

Higher CFG values also have the effect of reducing the original image style presence in img2img. Try 5 vs 15 vs 30 with a picture that you've tinted and added some noise to, just keep the denoising strength < 0.5 otherwise the effect will be hard to see.

2 points

How long did it take you to create this table and what was your workflow like? I’d love to try my hand at testing different prompt parameters so programmatically

2 points

Most of it is just testing random prompts to find an interesting result. After finding one, i use the same seed and just batch process them per line (26 images in various scales, 5 pass etc) Foldered them up, and open photoshop and youtube because dropping them one by one is very boring work haha. I hope to make some action shortcuts in photoshop to help reduce the time tabling it up.

1 points

that's interesting. may I ask you which keyword is the "scale" when I use SD from the command line?

2 points

Oh man I don’t know much if you are talking about command line, but it is mainly referred to as CFG value or CFG strength.

1 points

thank you, dont worry you know more than me! I just use it from the command line with the example comand they give on github

2 points

I've made a few of these, but they are too big for imgur and the likes to handle, what was the file size of your original image if you don't mind me asking?

2 points

This I think is the actual size, I compressed the jpg down to either 10 or 9 out of max 12 quality in photoshop during save

1 points

I'd love to see an Img2Img scale vs strength table as well.

Great job on this!

2 points

man, I though what good noise at 0 steps, until I zoomed in and realized it's people in a conference room to a shopping mall turning into cyclists. What a nightmare.

2 points

Haha yeah the ikea warehouse full of people was a bit weird. I thought I entered the wrong prompt at one point.

1 points

This is exactly what I needed. Holy .. Reddit recommended via push notification. Lovely! Thanks a lot ♥️

2 points

Everyday I look at this sub and say "bonkers" in amazement for different reasons. This was very enlightening, thank you op!

Also, damn it Nike! https://imgur.com/a/oWO3xqJ

2 points

Oh dang I didn’t realize it haha Also made me realize nike swoosh and coca cola swoosh can be similar!

2 points

What’s scale versus steps?

2 points

Scale is the strength of the guidance scale parameter you apply to the prompt. The higher the value it is, the more you tell the computer to literally follow your text prompt. The lower it is, the more you give creative freedom to the randomness.

Steps is how much time should you give the computer to enhance and refine the image, the more steps usually the better the details but after a certain number it becomes time cost vs quality and often too much steps makes the already good image “redrawn” into something else.

That’s pretty much what I learned and observed so far.

1 points

For the most part IDGAF about individual images on here, but parameter sweeps like this are invaluable. Thanks so much!

2 points

I like the name parameter sweep. Sounds so wooshy

1 points

OK WOW

i had been using the default cfg of 7.5, but now experimenting with around 13 for detailed prompts has given me some amazing results. thank you for showing us this!

2 points

The difference between 10/65 and 10/70 is huge.

I wonder why it was so unhappy with 10/65

(Form the proportions it looks like it absorbed the wheels from below and it is technically closer to a soda can shape, and then it had to fill out a lot of background.)

2 points
unknown author

Deleted before we saved it.

2 points

lol make sure you have the next day off if you indulge in the contents of the funky trucks in Scale 7:14 ; Steps 20:30 area.

2 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.