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:

NameMeaningOrderSpeed vs EulerSource
DPM2DPM-Solver order 22nd~2× slower (two network calls per step)arXiv:2206.00927
DPM2 aDPM-Solver order 2, ancestral2nd~2× slower + stochasticarXiv:2206.00927
DPM FastDPM-Solver with uniform step sizes1st~1× (one call per step)arXiv:2206.00927
DPM AdaptiveDPM-Solver with adaptive step sizing1st–3rdVariable — ignores your step countarXiv:2206.00927
DPM++ 2MDPM-Solver++ two-step multistep2nd~1× (reuses previous evaluation)arXiv:2211.01095
DPM++ 2M SDEDPM++ 2M with stochastic noise2nd~1× + stochasticarXiv:2211.01095
DPM++ 2S aDPM-Solver++ two-step single-step ancestral2nd~2× + stochasticarXiv:2211.01095
DPM++ 3M SDEDPM-Solver++ three-step multistep SDE3rd~1× + stochasticarXiv:2211.01095
DPM++ 2M SDE HeunDPM++ 2M SDE using Heun (midpoint) substep2nd~1× + stochasticarXiv: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.

SchedulerWhat it doesWhen to useSource
KarrasConcentrates steps near the end (low noise), reducing truncation error where it matters most for detailMost samplers, most models — the safe defaultarXiv:2206.00364
Linear (default)Evenly spaced noise levels from max to zeroOlder pipelines; still fine for many use cases
ExponentialExponentially decaying step sizesSome specialized workflows; rarely the best default
SimpleUsed by Flux-family modelsAlways with Flux; not for SD1.5/SDXLlocalaimaster.com
DDIMUniform steps, used by the DDIM sampler specificallyDDIM sampler onlyarXiv:2010.02502
BetaBeta-distribution-shaped scheduleNiche; 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 caseSamplerStepsSchedulerNotesSource
General-purpose, reproducibleDPM++ 2M Karras20–30KarrasFast convergence; widely usedstable-diffusion-art.com
General-purpose, variedDPM++ 2S a Karras20–30KarrasStochastic; different image each runstable-diffusion-art.com
Fast previewEuler10–15Karras or LinearSimple, converges quicklystable-diffusion-art.com
Quality at costHeun15–20Karras2× slower per step due to second-order evaluationstable-diffusion-art.com
One-shot/fastestUniPC5–15KarrasHigh quality in very few stepsarXiv: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 caseSamplerStepsCFGSchedulerNotesSource
Balanced qualityDPM++ 2M Karras20–305–8KarrasMost widely recommendedstable-diffusion-art.com
With refinerDPM++ 2M Karras40 (80/20)5–7KarrasMatches the Stability AI exampleSDXL model card
Fast iterationEuler15–205–7KarrasConverges well, quick feedback loopstable-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

SymptomLikely causeFixSource
Image looks washed out with FluxCFG set above 1.0Set KSampler CFG to 1.0; use FluxGuidance node for guidancelocalaimaster.com
Image keeps changing with more stepsUsing a stochastic samplerSwitch to a deterministic sampler (Euler, DPM++ 2M)stable-diffusion-art.com
Artifacts or garbled output with FluxDualCLIPLoader type set to SDXLChange type to "flux"localaimaster.com
Strange colors or high-contrast outputWrong VAE selectedUse the model's native VAE (Flux: ae.safetensors)localaimaster.com
Poor prompt adherence at low CFG with SDXLCFG too low for the samplerRaise 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