Stable Diffusion Samplers - Which samplers are the best and all settings explained!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome back I'm silicon thomaturgy and today we are going to Deep dive into sampler's in staple diffusion at the time of this video there are a whopping 22 Samplers which can be horribly confusing especially to new users so I'm going to break down what is different between them so you can pick out the best Samplers for you as my longtime viewers might know my first video also covered Samplers but this is not just a remaster with those three new Samplers shoehorned in we will also cover what changes with sdxl and what all those weird things like Ada and sigma churn do as always there are bookmarks in the video description so feel free to use them to get the information you want let's start out with the easiest development to explain sdxl there are two important differences the first is that three Samplers ddim plms and udpc cannot be used with sdxl the second important difference is that Euler a outputs look foggy and less sharp for sdxl which is important because Euler a is the default sampler for automatic 1111. there are a few other minor changes but I will call those out in the applicable section everything else applies to SD 1.5 and sdxl equally since comfy UI is very popular right now here's a chart showing how the sampler names encompet UI correspond to automatic 1111. overall it's pretty straightforward except comfy does not have Keras versions instead Keras is defined by the noise scheduling but enough trivia let's move on to something more concrete the first important parameter is processing speed basically how much computing power does it take to execute a single step for this there are only two groups fast and slow with DPM adaptive as a single outlier the slow Samplers take twice as long per step compared to the fast samplers pretty simple right the processing speed for DPM adaptive depends on the CFG with higher cfgs requiring more time to complete next let's talk about conversions and by convergence I mean whether or not the output image changes substantially if you add more steps for converging Samplers the image does not change much once it reaches the particular output little details can change but the overall image is pretty set this is because most of these Samplers do not add noise back in to latent image during generation I was considering adding a partial convergence category for Samplers with SD in their name these Samplers especially the non-keras versions tend to change a little bit more than the rest of the converging samplers for non-converging Samplers the image will continually change as more and more steps are used these Samplers have a lowercase a in their name which stands for ancestral and means that they add noise back in during image generation since DPM adaptive does not use steps convergence is not applicable to it another important variable is how many steps are needed to get a decent looking output most Samplers consistently get decent results within 20 steps though there are some slow pokes like DPM fast and plms which need more than 30. in general I'd say that even if you can get a decent image in 10 to 12 steps you're still going to get a boost in quality by going up to 20 or 30. in these charts I show the average and maximum steps I needed to get decent results with each sampler out of a sample size of nine don't view these numbers as precise because what constitute a good image to me might not meet the cut for you and the sample size is pretty small but it should give you a ballpark idea for which Samplers need the fewest steps foremost Samplers sdxl requires slightly fewer steps to get a good result however Hume was an exception to this an actual required more steps however just comparing steps isn't good enough because there are fast and slow samplers so here's a comparison showing the results after adjusting for processing speed in general care Samplers tend to be a bit faster than the non-keras versions while there are some slow pokes most Samplers fell within a relatively narrow range finally let's talk about the most important parameter for Samplers which is of course the output image here's a chart showing which cluster of Samplers resulted in similar outputs there are three main groups with two outliers this part is going to be a little different because I'll be discussing each group in detail to help you identify which Samplers are best for you Group 1 is the largest group and contains 11 of the 22 samplers for subgroup B the three Samplers with Keras in the name can occasionally result in different outputs than the others ddim is unique within Group 1 because it can have either output unipc is also unique because it has settings you can adjust which I'll discuss in the advanced section of this video all the group 1 Samplers converge and most do so in less than 20 steps with a couple exceptions since there are so many Samplers in group 1 how do we decide which ones are best It's Tricky but there are a couple with noticeable downsides first dpm2 and dpm2 Keras have slow processing speeds compared to their sibling DPM plus 2m and DPM plus 2m Keras hewn is another slow sampler in group 1. while these three have slightly lower step requirements it doesn't make up for requiring twice as much processing time per step LMS and plms usually need more than 30 steps to get good results so they're also slower than the others uni PC is unique and we'll talk about it later but for your average user you probably have better options LMS cares can lose image quality at very high steps however there is no reason to use more than 50 steps on a Groupon sampler so it's not much of a downside so that leaves four group one Samplers which perform roughly the same honestly there isn't a definitive best pick among group 1. I would say run some grids and pick out a couple you like my personal pick is DPM plus plus 2m Karis from group 1B ddim also had unique characteristics which make it worth using that we'll discuss in the advanced section of the video next we have the five group two Samplers which all have a lowercase a in the name which means ancestral and that they add noise back in during generation once again there are two subgroups with the care Samplers sometimes resulting in different output Euler a can match either set or just do its own thing all these Samplers do not converge which means the image will keep changing as you add more and more steps among these I would say that Euler a is my top pick for SD 1.5 because it has faster processing speed with relatively low steps needed the other four Samplers all have slow processing speed however for sdxl Euler a images don't look as sharp as the others so I would go with DPM Plus 2sa or DPM plus plus 2sa Keras dpm-2a and dpm-2a Keras are both slow and need more steps so that slows down their overall generation speed compared to the others I would not recommend using them group 3 includes any sampler with sde in the name and produce unique outputs compared to the other groups interestingly they seem to be between Group 1 and group 2 in terms of convergence that means you can change the image at higher steps but the change generally less drastic than the group 2 samplers since my original video group 3 got two new Samplers DPM plus 2msde and DPM plus 2m sde Keras the key difference is that the two original Samplers have slow processing speed while the two new ones have fast processing speed does that mean that they're better than the two original ones well it's split for DPM plus plus 2msde it takes a lot more steps to get a decent output sometimes more than 50 steps since you need more than twice as many steps to get a good output it negates the advantage of faster processing speed on the other hand while DPM plus plus 2m SD cares requires more steps in the old group 3 Samplers it's not quite double at 20 steps you can make a case for any of these three but at 30 steps and above DPM plus 2m SD Karis is the clear winner our first outlier is DPM adaptive while I classify this one as unique the results are usually pretty close to the group 2 samplers what makes this one unique is that it uses CFG instead of steps as its primary variable change in CFG changes the contrast and saturation of the image like it does for other Samplers but will rarely fry the image overall the output quality is generally pretty good the downside is that processing time is very long here's a chart showing how long it takes to generate 1024 by 1024 images with DPM adaptive there are slight differences in results between sdxl and SD 1.5 for SD 1.5 generating one DPM adaptive image at 7 CFG took time equivalent to 100 steps sdxl was a bit faster and generated one image at 7 CFG in time equivalent to 70 steps in both cases you could have generated at least three images with a fast sampler in the same time it takes her DPM adaptive to generate one as we know getting the right output image from stable diffusion can be a numbers game so generally I prefer to generate several images and pick the best one rather than wait for DPM adaptive to generate one but that said there's nothing wrong with it and our final outlier sampler is DPM fast DPM fast is basically the that guy of stable Fusion samplers it's always hanging around but not really good for much it does have a unique output that's really its only selling point DPM fast is a very sensitive CFG and needs more than 30 steps to get decent results at the default cfcf7 if you use lower CFG you can get decent results faster but overall I don't think it's worth using now we've finished up with the basics and are moving on to more advanced topics specifically all those sigmas and Adas in the settings tab first let's cover Ada by default ancestral Samplers have an ADA of one while ddim has an ETA of zero Ada measures how much noise is added back into the latent image after each step as you might recall this determines whether the output converges to a particular image or just keeps changing here are some examples showing how ddim and some ancestral Samplers behave at the same ETA as you can see the output is pretty similar for each data value so setting Ada to Zero Turns the group 2 ancestral Samplers into Group 1 and setting ddim Ada to 1 turns it into a group 2 sampler on par with Euler a since we already have 11 Group 1 Samplers keeping ddim as Group 1 has limited value what might interest you instead is setting ddim ETA to 0.5 and using it as an intermed between Group 1 and group 2. unfortunately you can't change Ada for individual group 2 Samplers so it's All or Nothing which limits its useless to me at least now let's talk about the advanced settings for the unipc sampler as a short intro unipc stands for unified corrector and predictor and it can only be used for text to image so ddim will be used for the second pass of hyrus fix the most important variable for UPC is order has a default value of 3 and impacts the number of steps you need orders higher than five don't seem to be able to get good results at all as order decreases you need fewer and fewer steps by setting order at one I can usually get good results with intense steps compared to over 20 steps at an order of three to be up front most people aren't going to find it worthwhile to mess with the rest of the unit PC settings but since you're here let's stick into it there are three variants for unipc bh1 bh2 and very underscore coeff among these very Co-op seem to be the most different but they are all quite similar Additionally the three skip types for unipc are time uniform time quadratic and log SNR these seem to impact the steps needed a little bit but the default value time uniform seems to be the best for low steps overall I didn't see any compelling reason to change the variant or skip type but if I missed something let me know in the comments below however you might consider lowering order to one or two if you want to use a new PC for low step generation next let's move on to sigmas and I'm not talking about those people who are obsessed with that chinless dude there are two sets of Sigma variables the first set highlighted here only works on a grand total of four Samplers Euler hewn dpm2 and dbm2 Keras this set includes Sigma churn Sigma T Min and sigma noise unfortunately it doesn't seem like Sigma tmin can be used with X Y plot so it's really just sick of noise and sigma churn signature is by far the more interesting of the two as you increase signature the output image gradually becomes more and more simple now this comes at the expense of starting to look fuzzy however this effect is not very noticeable at the default Sigma noise of one by itself Sigma noise does absolutely nothing its only purpose seems to be modifying the impact of Sigma churn as Sigma noise decreases Sigma churn has more and more impact however it is possible to go too far and the image turns into a blurry mess if you want to play with this feature I would recommend keeping signal noise between 0.4 and 0.75 to get a balance between changes and not turn it into a blurry mess also sdxl seems to be more impacted by Sigma churn than SD 1.5 finally we're moving on to the scheduler along with minimum Sigma maximum Sigma and rho none of these settings have any impact while scheduler is set to automatic additionally these settings do not work at all for a couple Samplers DPM adaptive unipc ddim plms and hewn the scheduler has three options Keras exponential and polyexponential for Samplers with cares in their name setting scheduler to Keras will yield the exact same results for non-care Samplers with a Keras version settings scheduled to Keras will turn it into the Keras version the non-care Samplers seem similar to exponential and poly exponential but not exactly the same next up is minimum Sigma which has a default value around 0.03 if you increase this value the images gradually lose their sharpness and eventually become a blurry mess overall I think it's best to leave this one as is on the other hand maximum Sigma is pretty interesting it acts as a brightness slider with higher values resulting in Darker images and lower values resulting in Brighter Images however it seems that increasing this too much can result in Earth effects occasionally appearing finally Row the impact of row depends on which scheduler is used the exponential scheduler does not seem to be impacted by row at all the default value for Keras is 7 but care seems to be pretty flexible in either direction unless you go pretty far finally poly exponential is very sensitive to row at 20 steps values as low as 3 will completely ruin the image this can be mitigated by using more steps though I'm not sure why you'd want to and that wraps up the advanced settings if this video taught you everything you wanted to know about Samplers like And subscribe to support the channel if you really like these videos consider supporting me by joining my patreon where you can view ad-free versions of all these videos as always thank you for watching and see you next time
Info
Channel: SiliconThaumaturgy
Views: 9,518
Rating: undefined out of 5
Keywords:
Id: JAMkYVV-n18
Channel Id: undefined
Length: 17min 6sec (1026 seconds)
Published: Sat Aug 12 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.