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)
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.
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.
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.
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.
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?
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.
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.
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.
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.
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.
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.
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
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.
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?
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.
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.
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!
(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.)
112 comments
This is excellent!
I've just started messing around with SD and this answers a bunch of questions.
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
What sampler did you use, i presume euler-a since it looks like lower steps produce better results?
Yes its euler-a!
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)
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.
I quite like ddim to heun. Ddim allows rapid iteration and if you reuse the seed heun will match the pose of a low step ddim.
I guess what to take from this is, less is more? the middle-upper-left seems to show the most interesting results...
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.
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.
Also depends on the prompt. Some prompts will take longer to converge.
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.
I wonder if CFG scale can be variable. Start out high "listen to me" and drop to "make it look good".
There is a patch in the lstein patch tracker that lets you vary CFG each step.
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?
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.
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."
From normal to heavy drinking to sobering up again
The similarity to a distractible child is also amusing.
Also, at scale zero, there's a.. bicycle convention hall?
That’s because he used Euler_a, making this a not very useful comparison.
What is scale exactly?
I’m not sure exactly but I read someone described it as:
Anything over 16 is like furiously shaking the computer and slapping its face
Fun fact you can use a negative scale to try to get the opposite of what you asked for.
I thought that was CFG or strength?
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.
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.
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.
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.
I like this interpretation!
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.
scale 0 is really like hey AI what you dreaming about?
Mostly people inside ikea or bicycles inside a hangar, then mostly just about wood
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.
r/dataisbeautiful
I love that subreddit, such good infographics visuals
What does scale actually do?
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.
I did not know you could do negative. I think higer values are just higly saturated.
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.
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
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.
Maybe it's good idea to use X/Y plot function from webui?
It gives you complete grids in addition to images.
Are you able to share the code/script you used to produce this?
I'd love to give it a shot hey.
Its basically manual so sorry, no script :) Its photoshop good ol boring grid placement
wow! that is a huge effort in that case.
Thanks for sharing :)
that's interesting. may I ask you which keyword is the "scale" when I use SD from the command line?
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.
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
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?
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
Thanks! I'll have to try and make another post.
I'd love to see an Img2Img scale vs strength table as well.
Great job on this!
Thats a good idea, thanks!
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.
Haha yeah the ikea warehouse full of people was a bit weird. I thought I entered the wrong prompt at one point.
This is exactly what I needed. Holy .. Reddit recommended via push notification. Lovely! Thanks a lot ♥️
❤️👍
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
Oh dang I didn’t realize it haha Also made me realize nike swoosh and coca cola swoosh can be similar!
What’s scale versus steps?
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.
For the most part IDGAF about individual images on here, but parameter sweeps like this are invaluable. Thanks so much!
I like the name parameter sweep. Sounds so wooshy
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!
Glad it helped!
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.)
Deleted before we saved it.
Mixing styles has a influence too.
Nice!
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.