ArtificialGuyBR

Home / Blog / Prompting and control

Stable Diffusion Samplers and Schedulers Explained

Pick the right sampler for SD1.5, SDXL, and Flux — deterministic vs. stochastic, step count trade-offs, and scheduler settings that matter.

11 sources cited Prompting and control

Stable Diffusion Samplers and Schedulers Explained

TL;DR


What a Sampler and a Scheduler Actually Do

In any Stable Diffusion model, denoising begins with a random latent image. The noise predictor estimates noise at each step. The sampler subtracts it — the numerical algorithm driving the latent from chaos to a clean image. The scheduler specifies how much noise should remain at each step. Together they form the denoising trajectory. (stable-diffusion-art.com)

More steps mean smaller noise reductions between steps, reducing truncation error. (stable-diffusion-art.com)


Correction: What LMS Stands For

A popular reference incorrectly expands LMS as Laplacian Pyramid Sampling. The actual name is Linear Multi-Step method — a standard ODE solver using history of previous derivative estimates to improve convergence. (stable-diffusion-art.com)


Deterministic vs. Stochastic: The Fundamental Split

Deterministic samplers

Euler is the most straightforward sampler. At each step it subtracts noise scaled by the schedule, following a fixed ODE trajectory. Given the same seed and step count, Euler always produces the same image. (stable-diffusion-art.com) That deterministic behavior also makes Heun (second-order, twice as slow) and LMS (multi-step) predictable: they converge to a stable output as step count increases. (stable-diffusion-art.com)

DPM++ 2M is a multistep variant of the DPM-Solver++ family. The "2M" stands for two-step multistep — it uses the previous denoising estimate to compute the current step, converging faster per network evaluation than plain Euler. (Lu et al., 2022) The k-diffusion implementation confirms this: sample_dpmpp_2m tracks old_denoised across steps and uses a ratio r to interpolate between current and previous predictions.

Stochastic samplers

Euler a (Euler ancestral) subtracts more noise than the schedule requires, then adds random noise back to match it. Every step depends on a specific random sample, so the result changes with each run even for the same seed. (stable-diffusion-art.com) Ancestral samplers — those with an "a" suffix: Euler a, DPM2 a, DPM++ 2S a — never converge: increasing step count keeps changing the image instead of settling. (stable-diffusion-art.com)

DPM++ SDE and DPM++ 2M SDE belong to the same stochastic class but use stochastic differential equations that inject Wiener-process noise through a Brownian-tree noise sampler. The k-diffusion implementation calls BrownianTreeNoiseSampler at each step and applies an eta parameter that controls how much SDE noise is added. These samplers do not converge and show fluctuating results as step count changes. (stable-diffusion-art.com)

Why this matters

If you need reproducible output — same seed, same image every time — stick with deterministic samplers. If you want creative variation with a single prompt, stochastic samplers give you that. The trade-off is convergence: deterministic samplers settle with enough steps; stochastic ones do not. (stable-diffusion-art.com)


The DPM-Solver Family: What Each Name Means

The DPM-Solver line was published by Lu et al. (2022) and improved in DPM-Solver++. The naming conventions: Name | Meaning | Order | Speed vs Euler | Source

|------|---------|-------|----------------|--------

DPM2 | DPM-Solver order 2 | 2nd | ~2× slower (two network calls per step) | arXiv:2206.00927 DPM2 a | DPM-Solver order 2, ancestral | 2nd | ~2× slower + stochastic | arXiv:2206.00927 DPM Fast | DPM-Solver with uniform step sizes | 1st | ~1× (one call per step) | arXiv:2206.00927 DPM Adaptive | DPM-Solver with adaptive step sizing | 1st–3rd | Variable — ignores your step count | arXiv:2206.00927 DPM++ 2M | DPM-Solver++ two-step multistep | 2nd | ~1× (reuses previous evaluation) | arXiv:2211.01095 DPM++ 2M SDE | DPM++ 2M with stochastic noise | 2nd | ~1× + stochastic | arXiv:2211.01095 DPM++ 2S a | DPM-Solver++ two-step single-step ancestral | 2nd | ~2× + stochastic | arXiv:2211.01095 DPM++ 3M SDE | DPM-Solver++ three-step multistep SDE | 3rd | ~1× + stochastic | arXiv:2211.01095 DPM++ 2M SDE Heun | DPM++ 2M SDE using Heun (midpoint) substep | 2nd | ~1× + stochastic | arXiv:2211.01095 The Hugging Face diffusers library defaults to algorithm_type="dpmsolver++" and recommends solver_order=2 for guided Stable Diffusion sampling. (diffusers source)


Scheduler: Karras, Simple, and the Noise Curve

The scheduler determines the shape of the noise reduction curve — which noise levels the model visits and in what order. Scheduler | What it does | When to use | Source

|-----------|-------------|-------------|--------

Karras | Concentrates steps near the end (low noise), reducing truncation error where it matters most for detail | Most samplers, most models — the safe default | arXiv:2206.00364 Linear (default) | Evenly spaced noise levels from max to zero | Older pipelines; still fine for many use cases | — Exponential | Exponentially decaying step sizes | Some specialized workflows; rarely the best default | — Simple | Used by Flux-family models | Always with Flux; not for SD1.5/SDXL | localaimaster.com DDIM | Uniform steps, used by the DDIM sampler specifically | DDIM sampler only | arXiv:2010.02502 Beta | Beta-distribution-shaped schedule | Niche; occasionally used with DDIM | —


Sampler Recommendations by Model

SD 1.5

For SD 1.5, most modern samplers work well at 20–30 steps. The main decision is whether you want deterministic or stochastic output. Use case | Sampler | Steps | Scheduler | Notes | Source

|----------|---------|-------|-----------|-------|--------

General-purpose, reproducible | DPM++ 2M Karras | 20–30 | Karras | Fast convergence; widely used | stable-diffusion-art.com General-purpose, varied | DPM++ 2S a Karras | 20–30 | Karras | Stochastic; different image each run | stable-diffusion-art.com Fast preview | Euler | 10–15 | Karras or Linear | Simple, converges quickly | stable-diffusion-art.com Quality at cost | Heun | 15–20 | Karras | 2× slower per step due to second-order evaluation | stable-diffusion-art.com One-shot/fastest | UniPC | 5–15 | Karras | High quality in very few steps | arXiv:2302.04867

SDXL

SDXL's larger architecture benefits from the same samplers but is more sensitive to step count and CFG settings. The Stable Diffusion XL model card from Stability AI recommends the base+refiner pipeline with 40 steps and an 80/20 noise split. (SDXL model card)

A practical starting point for SDXL: Use case | Sampler | Steps | CFG | Scheduler | Notes | Source

|----------|---------|-------|-----|-----------|-------|--------

Balanced quality | DPM++ 2M Karras | 20–30 | 5–8 | Karras | Most widely recommended | stable-diffusion-art.com With refiner | DPM++ 2M Karras | 40 (80/20) | 5–7 | Karras | Matches the Stability AI example | SDXL model card Fast iteration | Euler | 15–20 | 5–7 | Karras | Converges well, quick feedback loop | stable-diffusion-art.com

Flux

Flux uses rectified flow rather than the epsilon-prediction noise schedule of SD 1.5/SDXL. This changes the sampler and scheduler choice entirely. As documented in the ComfyUI Flux workflow guide:

Setting CFG above 1.0 washes the image out because Flux bakes guidance into the model, not the CFG multiplier. (localaimaster.com) Multiple practitioners confirm the Euler/Simple/CFG-1.0 setup across Forge, ComfyUI, and the Flux guide at andreaskuhr.com.


How Step Count Interacts with Sampler Choice

For deterministic samplers, more steps mean smaller noise reductions between steps, which reduces truncation error and helps the image converge. (stable-diffusion-art.com) For stochastic samplers — anything with an "a" suffix or "SDE" in the name — additional steps keep introducing randomness. The image keeps changing. (stable-diffusion-art.com) The DPM-Solver paper shows that DPM-Solver achieves 4.70 FID on CIFAR-10 in 10 function evaluations, reaching high quality in 15–20 steps with DPM-Solver++ for guided sampling. (Lu et al., 2022)


DDIM and PLMS: The Originals

DDIM (Song et al., 2020) was one of the first practical samplers, achieving 10–50× speedup over DDPM by using a non-Markovian reverse process. PLMS (Pseudo Linear Multi-Step) shipped alongside it in the original Stable Diffusion release. Both are now considered outdated — the stable-diffusion-art.com guide describes them as "generally seen as outdated and not widely used anymore." (stable-diffusion-art.com) If you are using them out of habit, switching to DPM++ 2M Karras will give you equal or better quality at fewer steps.


Common Errors and Fixes

Symptom | Likely cause | Fix | Source

|---------|-------------|-----|--------

Image looks washed out with Flux | CFG set above 1.0 | Set KSampler CFG to 1.0; use FluxGuidance node for guidance | localaimaster.com Image keeps changing with more steps | Using a stochastic sampler | Switch to a deterministic sampler (Euler, DPM++ 2M) | stable-diffusion-art.com Artifacts or garbled output with Flux | DualCLIPLoader type set to SDXL | Change type to "flux" | localaimaster.com Strange colors or high-contrast output | Wrong VAE selected | Use the model's native VAE (Flux: ae.safetensors) | localaimaster.com Poor prompt adherence at low CFG with SDXL | CFG too low for the sampler | Raise CFG to 5–8, or switch to a sampler designed for lower CFG | —


FAQ

What is the difference between deterministic and stochastic samplers?

Deterministic samplers (Euler, DPM++ 2M, Heun, LMS) follow a fixed ODE trajectory — given the same seed and settings, they always produce the same image. Stochastic samplers (Euler a, DPM2 a, DPM++ 2S a, DPM++ SDE variants) inject random noise at each step, so the output changes with every run. (stable-diffusion-art.com)

Why do samplers with an "a" suffix not converge?

The "a" stands for ancestral. These samplers subtract more noise than the schedule requires and add random noise back to compensate. This makes each step dependent on previous random samples, preventing the image from settling to a fixed point even at high step counts. (stable-diffusion-art.com)

How many steps should I use with DPM++ 2M Karras for SDXL?

The DPM-Solver++ paper demonstrates high-quality results in 15–20 steps. For SDXL, 20–30 steps is a practical range. More steps yield diminishing returns once the noise schedule reaches the low-noise region. (Lu et al., 2022)

Do higher steps always improve detail in latent diffusion?

For deterministic samplers, higher steps reduce truncation error, which generally improves fidelity — but the gains plateau. For stochastic samplers, additional steps do not converge; they keep changing the image. The scheduler shape (e.g., Karras) can matter more than raw step count. (stable-diffusion-art.com, Karras et al. (2022))

When should I use DDIM instead of DPM++?

In most cases, you should not. DDIM was one of the first practical diffusion samplers but is now outperformed by DPM-Solver++ variants in both speed and quality. (stable-diffusion-art.com) The main remaining use case is workflows that require the specific DDIM noise schedule (uniform steps).

What sampler and settings does Flux use?

Flux.1 dev uses Euler with the Simple scheduler at CFG 1.0. Guidance is set separately through the FluxGuidance node (default 3.5). Using CFG above 1.0 produces washed-out images because Flux bakes classifier-free guidance into the model. (localaimaster.com, andreaskuhr.com)


Sources