One day they might find out how to analyse weighted networks. On that day they'll find out that the part that should have been for hands always evolves to handle tits instead.
Hijacking comment to say that DPM++ is the result of new research with the advantage of producing comparable results in terms of detail level to the other samplers at only 20 steps.
This is really worth highlighting and passing on the praises, A1111's repo uses k-diffusion under the hood, so what happened is k-diffusion got the update and that means it automatically got added to A1111 which imports that package. It's smart to have set up this linkage (A1111) to automatically get you advancements straight from the tap (crowsonkb).
Big ups to @RiversHaveWings
Edit: And the researcher/paper authors. There are too many people doing too much good stuff to keep track of 😅
Sometimes I forgive how crazy is all this. Thanks to all these genius we are playing with academic researchs of a few months ago for free in our own computers.
I been testing out the new ones. To me and my style of prompting they just are... better. Not in any grand on amazing specific way, they just can layer things better.
Such as a shirt and pants, it can make the shirt go over the waist of the pants instead of trying to mix them together. You if you look at the preview window you can see it call the subjects separately, layer them and correcting the boundary.
Yes... The "old" samples can also do this sometimes. However these seem to be more reliable. My favourite thus far is the DPM++ 2 a Karras a name which only and engineer could have come up with.
I found that no sampler really brings real benefit over 80. Only use steps more than that for final refinement. Sweet spot seems to be 50 for practical mass generation. I have tested steps to 1000. Don't get me wrong, they all do something at all steps, however after 150 it is just edge refining. Useful if you have lots of hair or such complexity.
But in reality optimal steps changes on model, settings, complexity of prompt, and taste.
I mass generate lots, then use "save all steps" script to capture everything from one long generation.
Well I'd say that with same seed and prompt, comparing the new and old prompts isn't that much different overall - the new samplers just seem to be more reliable at making good stuff.
Now since I do things in batches of hundreds to thousand, and I have about 0,1-0,5% rate of success. The new samples seems to be with the few hours of testing the success rate for something good that fits my goal has gone to like 1-5% so that is an increase of one magnitude which is good.
I haven't really tested it in any other way than clothing and such.
If you want to dive into DPM++, you can read the pdf detailing the implementation.
What I found interesting to quote:
2S stands for Singlestep, 2M for Multitstep
We run both DPM-Solver++(2S) and DPM-Solver++(2M), and we find that for large guidance scales,
the multistep DPM-Solver++(2M) performs better; and for a slightly small guidance scales, the
singlestep DPM-Solver++(2S) performs better.
Experiment
results show that DPM-Solver++ can generate high-fidelity samples and almost converge within only
15 to 20 steps, applicable for pixel-space and latent-space DPMs
I am interested in what the samplers actually do in the denoising. Between input data (=more or less noise) model weights - what does the sampler do in each step.
The DPM++ 2M (and karras) are very fast compared with the rest of DPM And tend to converge very fast to a final picture in many cases (betwwen 30- 40 steps, even when I've found pictures that keep changing as we increase the steps, in most part of cases the picture find stability in 30-40 steps )
I've been using DPM++ 2S a, the steps can be chaotic in my experience as well, but you can typically get good results at 10-14 steps. I'm liking it for exploring prompts quickly.
This is great and it seems like some of the new samplers might be a bit better but do we really need this many when no one even knows what the ones we already had did? Maybe I'm just out of the loop but it seems like all anyone is using right now is Euler A and Heun. Someone just needs to figure out what the good one is and we can all use that and ignore the rest like we do right now. There are too many other variables (seed, cfg, steps, prompt) to discern what possible benefit we might get from using a specific sampler.
There is no 'good one' that's why new ones are being added. If you know how seed, cfg and steps work, how to prompt, the style you are trying to make etc usually you know which sampler to use and sometimes switching the sampler will give you better results than you expect. There's also computational benefit in working with different samplers at different cfg and steps which matters significantly if you aren't just trying to make one image at a time.
If that was true, there would be a clear difference in these comparisons at certain CFGs and steps and there generally isn't. Beyond the general advice of setting the steps above 30-40 and there not being a lot of benefit going past 70-80 and using a CFG between roughly 8 and 20, there isn't any clear correlation between the quality of the output and the sampler used, it's just different compositions and in this case different face paint configurations.
Sure, using a different sampler on the same seed might get you a different result but will the result be any better than just using a different seed? It's impossible to say so adding the additional variable of changing up the sampler seems to just be needless complexity with no tangible benefit you're going to notice unless you're just producing endless variants on the same seed in which case, you're ignoring the effects of the seed variable and choosing the tweak the sampler variable.
If you think you understand the latent space well enough to know which of the 18 different samplers is going to produce the best result for any given prompt, cfg, and steps settings, then I'll check out your guide but until then, I've got enough variables to throw into the black box already.
DPM2 and its variants should be able to get similar results with much fewer steps by using high order approximation. I think this will be a very good reason to swap to this family of samplers. However, objectively faster solvers do not mean we could get subjectively good results. Especially for high CFG values, the end results are actually dominated by approximation errors of each samplers.
This makes sense. I'm not saying there's no reason for having multiple samplers, I can see having one that works well for lower steps, one that works well for higher or lower cfg values, etc. but unless some samplers are particularly good at specific prompts or subjects, it's hard to imagine making effective use of 18 of them. I suppose there's no harm in giving people as much choice as possible but choice can also be paralyzing as well so I'm probably less likely to bother experimenting with them if there are 5 for every given scenario than if there was one that worked best for each situation most of the time. That would be the information it would be good to have but I don't think a single subject with a single seed is sufficient to draw those conclusions.
How come only a couple of samplers failed here at CFG > 16 ? I, for example, often have LMS and many others fail at higher CFG very often (even with > 100 steps). Also, with a prompt like this it's hard to judge the coherence - all results look correct in all cases. Here is a simpler, but muuuch more difficult to generate prompt - "a photo of a person laying on a bed. top-down view.", you'll see all sort of distortions and color explosions. Only highest CFG will produce something meaningful, but only some samplers can work well with the higher CFG.
Is someone else observing Euler a gives different results as before too with the same seeds and prompts? Looks like there was an update too. Still don´t know if i like the newer Euler a results better without further testing.
Edit: forget about that. A tutorial for a model was asking me to set the " Stop At last layers of CLIP model " setting to 2. Setting it back to 1 gives me back the old results. So does not looks like there are any changes on the old samplers (at least not on Euler a).
127 comments
Cool, now let’s see the comparison with an overly busty maiden by Greg Rutkowski like AI God intended.
One day they might find out how to analyse weighted networks. On that day they'll find out that the part that should have been for hands always evolves to handle tits instead.
Alternate IMGUR: https://imgur.com/a/4IiZdFK
Prompt: a super creepy photorealistic male circus clown, 4k resolution concept art, eerie portrait by Georgia O'Keeffe, Henrique Alvim Corrêa, Elvgren, dynamic lighting, hyperdetailed, intricately detailed, art trending on Artstation, diadic colors, Unreal Engine 5, volumetric lighting
No highres fix, face restoratino or negative prompts. Done at 50 steps at 512x512 with a seed of 8675309, Stable model 1.5
Samplers: Euler a, Euler, LMS, Heun, DPM2, DPM2 a, DPM++ 2S a, DPM++ 2M, DPM Fast, DPM Adaptive, LMS Karras, DPM2 Karras, DPM2 a Karras, DPM++ 2S a Karras, DPM++ 2M Karras, DDIM, PLMS
Hijacking comment to say that DPM++ is the result of new research with the advantage of producing comparable results in terms of detail level to the other samplers at only 20 steps.
Where can I learn more about this? I couldn't find anything about it. Thanks!
Very cool, thanks for sharing! Also, OK, I have to know why Georgia O'Keeffe was your first choice for an evil clown haha
Her style of modernism combined with Elvgren's pinup/portrait style with a dash of Corrêa's sci-fi surrealism makes for a good combo.
Plus it's not Rutkowski.
How do I get some of these new samplers? I'm using AUTO1111s SD thing.
Do a git pull command to grab the latest
Amazing. Thanks for all your hard work.
Does the "hyperdetailed" tag make a difference?
I'm sure it make some difference but I bet it's not quantifiable :)
These were implemented by Katherine Crowson.
https://github.com/crowsonkb/k-diffusion
This is really worth highlighting and passing on the praises, A1111's repo uses k-diffusion under the hood, so what happened is k-diffusion got the update and that means it automatically got added to A1111 which imports that package. It's smart to have set up this linkage (A1111) to automatically get you advancements straight from the tap (crowsonkb).
Big ups to @RiversHaveWings Edit: And the researcher/paper authors. There are too many people doing too much good stuff to keep track of 😅
Sometimes I forgive how crazy is all this. Thanks to all these genius we are playing with academic researchs of a few months ago for free in our own computers.
"All those nerd geniuses messing about all day! What have the nerds ever done for us?" said Chad, while trying to use the Uber app,
>sends Chad a couple of imgur links & the URL for an online SD site.
"Oh. Nerds rule." - Chad.
Am aware :)
I've even been chatting with her here and there for a year on Twitter... so much has changed since last year in this field for sure
Edited for clarity, holy typos Batman!
In my headspace, the "K" stands for Katherine and not Karras :)
I been testing out the new ones. To me and my style of prompting they just are... better. Not in any grand on amazing specific way, they just can layer things better.
Such as a shirt and pants, it can make the shirt go over the waist of the pants instead of trying to mix them together. You if you look at the preview window you can see it call the subjects separately, layer them and correcting the boundary.
Yes... The "old" samples can also do this sometimes. However these seem to be more reliable. My favourite thus far is the DPM++ 2 a Karras a name which only and engineer could have come up with.
DPM++ 2 a Karras has now replaced Euler a as default and PLMS has replaced DDIM.
6 months ago this whole sentence would have been mumbo jumbo to me.
Now it's almost like a program directly telling my brain: "You have to test this NOW !"
PLMS is better at infill than DDIM? I didn't even think to try that, I only used to use PLMS for portraits because it was the best at faces.
Replaced them for what exactly? I'm not certain I know what different use cases those samplers were best for.
i'm eager to try it, could you tell me the amount of steps that seems to work best for you?
for
euler ait usually was up to 40/50and could you tell how the speed of generation compares to euler?
I found that no sampler really brings real benefit over 80. Only use steps more than that for final refinement. Sweet spot seems to be 50 for practical mass generation. I have tested steps to 1000. Don't get me wrong, they all do something at all steps, however after 150 it is just edge refining. Useful if you have lots of hair or such complexity.
But in reality optimal steps changes on model, settings, complexity of prompt, and taste.
I mass generate lots, then use "save all steps" script to capture everything from one long generation.
Good to know about clothing. i am seeing some better results here and there, it may be dependent on the subject matter too.
Well I'd say that with same seed and prompt, comparing the new and old prompts isn't that much different overall - the new samplers just seem to be more reliable at making good stuff.
Now since I do things in batches of hundreds to thousand, and I have about 0,1-0,5% rate of success. The new samples seems to be with the few hours of testing the success rate for something good that fits my goal has gone to like 1-5% so that is an increase of one magnitude which is good.
I haven't really tested it in any other way than clothing and such.
Thanks, I hate them all.
They will be waiting for you in your dreams tonight.
It is a weird human trait to do something useful and feel the need to spike it with something unpleasant.
If you want to dive into DPM++, you can read the pdf detailing the implementation.
What I found interesting to quote:
I am interested in what the samplers actually do in the denoising. Between input data (=more or less noise) model weights - what does the sampler do in each step.
The DPM++ 2M (and karras) are very fast compared with the rest of DPM And tend to converge very fast to a final picture in many cases (betwwen 30- 40 steps, even when I've found pictures that keep changing as we increase the steps, in most part of cases the picture find stability in 30-40 steps )
in other words, their diffusions are very stable :)
Yep XD. But it depends on the picture there are some cases that it keep changing and changing.
I've been using DPM++ 2S a, the steps can be chaotic in my experience as well, but you can typically get good results at 10-14 steps. I'm liking it for exploring prompts quickly.
Is it ancestral?
Ancestral reintroduces noise so it will be much more chaotic by design.
This is great and it seems like some of the new samplers might be a bit better but do we really need this many when no one even knows what the ones we already had did? Maybe I'm just out of the loop but it seems like all anyone is using right now is Euler A and Heun. Someone just needs to figure out what the good one is and we can all use that and ignore the rest like we do right now. There are too many other variables (seed, cfg, steps, prompt) to discern what possible benefit we might get from using a specific sampler.
There is no 'good one' that's why new ones are being added. If you know how seed, cfg and steps work, how to prompt, the style you are trying to make etc usually you know which sampler to use and sometimes switching the sampler will give you better results than you expect. There's also computational benefit in working with different samplers at different cfg and steps which matters significantly if you aren't just trying to make one image at a time.
If that was true, there would be a clear difference in these comparisons at certain CFGs and steps and there generally isn't. Beyond the general advice of setting the steps above 30-40 and there not being a lot of benefit going past 70-80 and using a CFG between roughly 8 and 20, there isn't any clear correlation between the quality of the output and the sampler used, it's just different compositions and in this case different face paint configurations.
Sure, using a different sampler on the same seed might get you a different result but will the result be any better than just using a different seed? It's impossible to say so adding the additional variable of changing up the sampler seems to just be needless complexity with no tangible benefit you're going to notice unless you're just producing endless variants on the same seed in which case, you're ignoring the effects of the seed variable and choosing the tweak the sampler variable.
If you think you understand the latent space well enough to know which of the 18 different samplers is going to produce the best result for any given prompt, cfg, and steps settings, then I'll check out your guide but until then, I've got enough variables to throw into the black box already.
Most of the samplers are solving the exact same diffusion equation.
Based on the paper of DPM-Solver: https://github.com/LuChengTHU/dpm-solver
DPM2 and its variants should be able to get similar results with much fewer steps by using high order approximation. I think this will be a very good reason to swap to this family of samplers. However, objectively faster solvers do not mean we could get subjectively good results. Especially for high CFG values, the end results are actually dominated by approximation errors of each samplers.
This makes sense. I'm not saying there's no reason for having multiple samplers, I can see having one that works well for lower steps, one that works well for higher or lower cfg values, etc. but unless some samplers are particularly good at specific prompts or subjects, it's hard to imagine making effective use of 18 of them. I suppose there's no harm in giving people as much choice as possible but choice can also be paralyzing as well so I'm probably less likely to bother experimenting with them if there are 5 for every given scenario than if there was one that worked best for each situation most of the time. That would be the information it would be good to have but I don't think a single subject with a single seed is sufficient to draw those conclusions.
Deleted before we saved it.
Deleted before we saved it.
https://github.com/LuChengTHU/dpm-solver
so around 15 steps for a decent result
A new list! Nice! I still have the old one. Take an award!
Thank you, kind Redditor!
Curious if any of the new ones may work better w/ custom Dreambooth created checkpoints....perhaps some that are a bit overfit. Need to try them.....,
Holy crap there's EVEN MORE of them now?
Also DPM 2M++ Karras is my new favorite.
Why CFG scale? The most important stats are the number of steps it takes, how long each step takes, and whether it's an ancestral sampler or not.
If you have time, can you help to verify this fix? It should make some of these newer samplers more stable at lower step count: https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/4373#issuecomment-1304719626
DPM Karras2 is giving me nightmares right now. It's like it glanced out to see if we were watching then was trying to play it cool...
Wow! great work, how long did this take? Thanks for sharing. This is very informative 👍👍
Thank you, it took about 24 minutes on an NVIDIA 3060 with 12 GB of VRAM
r/tihi !!
Meanwhile, this dapper fellow:
https://preview.redd.it/tqbd3nqttdy91.png?width=958&format=pjpg&auto=webp&s=589a93523e3e376fafcc34114c7c0063dfd12f60
Glad you hate it, here's a larger version :)
Reminds me of Boy George from Culture Club a long time ago ...
Deleted before we saved it.
Out of all of these there is a most terrifying one and I'm so scared I'm gonna find him
Ok thanks, so Euler A is still my preferred sampler.
Them DPMs
I'm going to have nightmares now.
So much POWER! Lol this is 😎 cool
How come only a couple of samplers failed here at CFG > 16 ? I, for example, often have LMS and many others fail at higher CFG very often (even with > 100 steps). Also, with a prompt like this it's hard to judge the coherence - all results look correct in all cases. Here is a simpler, but muuuch more difficult to generate prompt - "a photo of a person laying on a bed. top-down view.", you'll see all sort of distortions and color explosions. Only highest CFG will produce something meaningful, but only some samplers can work well with the higher CFG.
Is someone else observing Euler a gives different results as before too with the same seeds and prompts? Looks like there was an update too. Still don´t know if i like the newer Euler a results better without further testing.
Edit: forget about that. A tutorial for a model was asking me to set the " Stop At last layers of CLIP model " setting to 2. Setting it back to 1 gives me back the old results. So does not looks like there are any changes on the old samplers (at least not on Euler a).