Sampling Methods & Steps

The long list of samplers available in GUIs like ComfyUI and Automatic1111 can be intimidating. However, the real-world actual difference in output is impactful, but not nearly as impactful as a good model or prompt.

At the highest level, when you generate an image, the diffusion model starts with random noise and gradually removes it in steps until a clear image forms, a process called sampling.

To demonstrate, here’s what the denoising process looks like:

Different sampling methods, or samplers, remove noise in their own ways, affecting speed and image quality. Some popular samplers are:

Euler20-30FastGoodSimple, deterministic
DPM++ 2M Karras20-30FastGreatBalanced speed and quality
DPM++ SDE Karras10-15SlowBestPrioritizes quality over speed
UniPC20-30FastGoodNewer sampler, good all-around choice

More steps usually mean better quality but slower generation, while fewer steps are faster but may produce less detailed images.

Ancestral samplers, like Euler and DPM2, add random noise during each sampling step. This can create interesting variations but makes the final image non-deterministic. Non-ancestral samplers are more predictable and consistent.

The best sampler and number of steps depend on your goals. For a good balance, try DPM++ 2M Karras with 20-30 steps. If you want the highest quality and don’t mind waiting, use DPM++ SDE Karras with 10-15 steps. Experiment to find what works best for you!

By understanding samplers and steps, you can fine-tune your Stable Diffusion results and create the images you want more easily. Don’t be afraid to try different combinations and see how they affect your output!

Leave a Comment