How It Works

Sampling Methods & Steps

A high level overview of sampling methods and steps

Shawn @ Prompting Pixels

What You'll Learn

Learn how sampling methods control how AI removes noise to create images, and discover which samplers and step counts balance speed with quality for your needs.

Video Walkthrough

Prefer watching to reading? Follow along with a step-by-step video guide.

Sampling Methods & Steps

Understanding Samplers in Stable Diffusion

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

Note: Sampler performance varies significantly between models and even between fine-tunes of the same base model. The recommendations below are starting points—always experiment with your specific model to find optimal settings.

How Sampling Works

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.

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

Popular Samplers Comparison

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

Recommendations by Model Family

SD 1.5

The most forgiving model family—nearly all samplers work well.

  • Recommended: DPM++ 2M Karras @ 20-30 steps
  • Alternative: Euler a @ 20-30 steps for faster iteration
  • CFG Scale: 7-8

SDXL

Requires slightly different tuning than SD 1.5.

  • Recommended: DPM++ 2M Karras @ 20-30 steps
  • Alternative: Euler @ 25-35 steps
  • CFG Scale: 5-7 (lower than SD 1.5)
  • Note: If using base + refiner workflow, the refiner typically needs fewer steps (10-15)

Flux (Dev/Schnell)

Flux uses flow matching rather than traditional diffusion, so sampler behavior differs significantly.

  • Flux Dev: Euler @ 20-28 steps
  • Flux Schnell: Euler @ 4 steps (optimized for speed)
  • CFG Scale: 1-3.5 (much lower than SD models)
  • Note: Karras schedulers have minimal effect on Flux; stick with default/normal scheduler

SD3 / SD3.5

Uses rectified flow like Flux.

  • Recommended: Euler @ 20-30 steps
  • Alternative: DPM++ 2M @ 25-35 steps
  • CFG Scale: 4-7
  • Note: Often benefits from slightly higher step counts than SDXL

Z-Image Turbo

  • Recommended: Res Multistep @ 9 steps
  • CFG Scale: 1

Steps and Quality

More steps usually mean better quality but slower generation, while fewer steps are faster but may produce less detailed images. However, there's a point of diminishing returns—going beyond 40-50 steps rarely improves output and can sometimes degrade it.

Ancestral vs Non-Ancestral Samplers

Ancestral samplers (marked with "a" like Euler a, DPM2 a) add random noise during each sampling step. This can create interesting variations but makes the final image non-deterministic—you'll get different results even with the same seed. Non-ancestral samplers are more predictable and consistent, which is better for reproducible workflows.

Quick Start Recommendations

GoalSamplerSteps
Fast iteration/testingEuler15-20
Balanced performanceDPM++ 2M Karras20-30
Highest qualityDPM++ SDE Karras25-40
Flux modelsEuler20-28 (Dev) / 4 (Schnell)

Experiment to find what works best for your specific model and use case! By understanding samplers and steps, you can fine-tune your results and create the images you want more efficiently.

Want More AI Image Tutorials?

Get the best AI image tutorials and tool reviews—no spam, just 1 or 2 helpful emails a month.

Continue Learning

More How It Works Tutorials

Explore additional tutorials in the How It Works category.

View All Tutorials