What is Stable Diffusion Sampling method? Compare and verify the difference!

  • There is a Sampling method on the Stable Diffusion screen, but what is this?
  • Which one should you choose in the end?
  • I want to know the difference between each sampler!.

We will answer these questions for you.

What is Stable Diffusion Sampling method? Compare and verify the difference!
What is Stable Diffusion Sampling method? Compare and verify the difference!

What is Stable Diffusion Sampling method? Compare and verify the difference!

A sampling method (sampler) plays an important role in generating illustrations with Stable Diffusion. If you choose something that is not suitable, there are disadvantages such as the quality of the illustration dropping and the creation time taking a long time.

However, there are so many types that I don't know which one to choose.

In this article, I will explain these :

  • [Conclusion] Recommended sampling method (sampler) is DDIM.
  • Sampling method (sampler): Algorithm during sampling.
  • Two features of the sampling method (sampler) that you want to keep in mind.
  • If you want to generate illustrations more smoothly...
  • How to easily manage a large number of generated illustrations.
  • Sampling method (sampler) FAQ.

so if you read to the end, you will understand the difference between the sampling methods, and you can choose the one that suits you.

If you are a beginner or have any questions about Stable Diffusion, please read the following articles. It explains in detail how to download and use Stable Diffusion.

>> [Complete Beginner's Guide] Thorough explanation of how to use Stable Diffusion!

[Conclusion] Recommended sampling method (sampler) is DDIM

Recommended sampling method (sampler) is DDIM
Recommended sampling method (sampler) is DDIM
As a conclusion, the sampling method that I recommend the most is DDIM.

The reason is that DDIM can generate high-quality illustrations at high speed and with a small number of steps. If you set the number of sampling steps to about 15 to 20 and turn around, the gacha efficiency will be maximized.

The sampling method recommended at the next point is :
  • Euler
  • DPM++ 2M Karras
around here. Both are about the same speed as DDIM and can generate high-quality illustrations with about 20-30 steps. To be honest, it's not that big of a difference compared to DDIM.

These two are especially recommended when looking for reproducibility of illustrations, such as when comparing with other models with the same Seed value. Since DDIM does not converge, it may be difficult to compare with other models (details will be described later).

Reproducibility is a rare case, so it is recommended to think about "DDIM if you get lost".

Check the sampling method recommended by the model

If there is a specification on the download page of the model to be used, use it without hesitation.

Source: Hugging Face

Many models specify a recommended sampling method. You may have overlooked or forgotten something, so please check it out.

Sampling method (sampler): Algorithm during sampling :

*In this article, STABLE DIFFUSION ART is written with reference toFor more information, please visit the above God site.

Sampling method can be described in a few words as an "algorithm for removing noise (sampling)".

The process by which Stable Diffusion generates an illustration is completely different from when a human draws a picture.

When we humans draw, we draw lines on a pure white canvas with a brush or pencil.

On the other hand, Stable Diffusion draws pictures by removing noise from images full of noise. An image of subtracting noise for the number of sampling steps and what remains is a picture.

Some people may feel that it is difficult to understand with only sentences, so let's actually see the difference for each sampling step.

This is a comparison of the difference in illustrations for each step in DDIM with the Seed value fixed. Steps 1 and 2 are completely just noise screens, aren't they?

On the other hand, here is a video of the same experiment with the sampling method changed from DDIM to Euler. You can see that the noise reduction method is different compared to DDIM.

This is the difference in the sampling algorithms that the Sampling method has.

Two features of the sampling method (sampler) that you want to keep in mind

The following two features of the sampling method should be kept in mind :
  • Ancestral samplers do not converge and have poor reproducibility..
  • For everyday use, speed and quality are more important than reproducibility
I will explain in order.

Ancestral samplers do not converge and have poor reproducibility

Among the sampling methods, there is something called "Ancestral (= Ancestral / Ancestor) samplers", and if you use this, the illustration will not converge.
Ancestral samplers are :
  • Euler a.
  • DPM2a.
  • DPM++ 2S a.
  • DPM++ 2S a Karras.
In addition to the ones with "a" in the name, DDIM and PLMS are also included.

It's a story about "What is convergence?", but this refers to the shape of the illustration changing at each sampling step.

Specifically, if you extract from the DDIM step comparison video I showed you earlier :

Speed ​​and quality are more important than reproducibility in the sampling method that I usually use.

Usually, when generating illustrations, the most important thing is whether or not they can generate beautiful illustrations quickly after.

From that point of view, DDIM is the most recommended. Check out this graph comparing Perceptual Quality.
The lower the number on the vertical axis of the graph, the higher the quality, but DDIM (light blue) achieves high quality even with as few steps as 7-8. It seems that the result is that the quality improves faster than Euler (black).

Hmmm, what do you think? Will DDIM get high-quality that quickly? That was a questionable result. DDIM draws completely different illustrations from steps 8 to 10.

Isn't there much difference in quality when the number of steps is small? That's my impression.

I think it depends on the environment and the model used, so I recommend DDIM based on the results of STABLE DIFFUSION ART. Even in my environment, DDIM is not a bad result.

Again, if you need the reproducibility of the illustration, Euler or DPM++ 2M Karras is recommended instead of DDIM. Let's use it properly.

Next Post Previous Post
No Comment
Add Comment
comment url