What Is a Sampler in Diffusion? Euler, DDIM and DPM++ Compared
Updated 11 September 2026 · Twin AI Labs
A sampler — also called a scheduler or solver — is the algorithm a diffusion model uses to turn random noise into an image, removing a little noise on each step. It sets the speed–quality trade-off: a first-order sampler like Euler wants 20–30 steps, while UniPC or LCM can land a usable image in 5–10.

What is a sampler in AI image generation?
A sampler is the numerical method that drives the reverse process of a /glossary/diffusion model. The model is trained to predict the noise in a slightly noisy image; the sampler repeatedly applies that prediction to walk from pure noise back to a clean picture. Different samplers are different ways of solving that same underlying equation, so they reach different results at different speeds. In tools like /alternatives/stable-diffusion you choose a sampler by name — Euler, DDIM, DPM++ 2M Karras — alongside a step count. The sampler does not change what the model knows; it changes how efficiently and smoothly the model's knowledge is turned into pixels.
How a sampler works
Every diffusion model defines a noise schedule — a plan for how much noise exists at each of, say, a thousand timesteps. Generating an image means running that schedule in reverse. At each step the sampler asks the model "how much noise is here?", subtracts a portion of it, and moves to the next, less-noisy point. The mathematics is an ordinary or stochastic differential equation, and a sampler is simply a solver for it: a first-order solver like Euler takes simple straight steps, while higher-order solvers like DPM++ 2M estimate the curve and take bigger, more accurate steps, so they need fewer of them. The "Karras" label refers to a smarter spacing of those steps introduced in a 2022 paper.
See the DDIM paper at arxiv.org/abs/2010.02502 and the EDM paper (Karras et al., 2022) at arxiv.org/abs/2206.00364 for the underlying maths.

Euler vs Euler a vs DDIM vs DPM++ 2M Karras
Six samplers cover almost everything you will meet in a settings panel. They differ on three things: whether they are deterministic (the same seed repeats the same image) or ancestral (fresh noise every step, so the result keeps drifting), how many steps they need, and what they are good at. Euler and Euler a are the pair people confuse most often — same solver, but the "a" adds noise back in at every step, which is why Euler a never settles no matter how many steps you give it.
| Sampler | Deterministic? | Typical steps | Best for |
|---|---|---|---|
| Euler | Yes (first-order) | 20–30 | A reliable default; converges cleanly |
| Euler a (ancestral) | No — fresh noise each step | 20–40, never settles | Creative variety when you want drift |
| DDIM | Yes | 20–50 | img2img and animation, where frames must not flicker |
| DPM++ 2M Karras | Yes (higher-order) | 20–30 | Modern go-to default; quality per step |
| UniPC | Yes (predictor–corrector) | 5–10 | Fast drafts at low step counts |
| LCM / Turbo | Yes (consistency-based) | 1–8 | Near-instant results, slight quality trade |
How do sampler, steps and CFG interact?
The sampler is one of three linked controls. Steps set how many denoising iterations the sampler runs — more steps usually mean more detail up to a point of diminishing returns, and the right number depends on the sampler, since a high-order one needs far fewer. CFG (classifier-free guidance) controls how strictly the model follows your /glossary/prompt and is independent of the sampler. Ancestral samplers such as Euler a interact with the seed differently, because their injected noise means results keep shifting even at high step counts. Changing the sampler while keeping the seed, prompt and steps fixed is a clean way to see its effect. These settings sit alongside your prompt and any /glossary/lora you load.
How Twin AI handles samplers
Twin AI is built so you never have to pick a sampler, a step count or a scheduler by hand. When you generate in /create/photo or /use-cases/image-generator, Twin selects a well-tuned sampler and step budget for each model behind the scenes, so you get a high-quality image without touching a settings panel. Its /photoshoots templates are pre-configured end to end, and because Twin runs several image models you can compare their output — for example in /compare/midjourney-vs-flux — without learning each one's sampler names. Everything is payable with a Russian card or SBP, with no VPN required. Start free in /create/photo.
Sources
FAQ
What is a sampler in Stable Diffusion?
A sampler is the algorithm that removes noise step by step to turn random noise into an image. In Stable Diffusion you pick one by name — such as Euler, DDIM or DPM++ 2M Karras — together with a step count; it controls the speed–quality trade-off, not what the model knows.
Which sampler is best?
There is no single best sampler, but DPM++ 2M Karras is a popular modern default because it produces high-quality images in only 20–30 steps. Euler and DDIM are reliable, fast choices, while LCM or Turbo samplers are best when you need near-instant results.
What is the difference between Euler and Euler a?
Euler is deterministic: with the same seed, prompt and settings it returns the same image, and adding steps makes it converge. Euler a is the ancestral version of the same solver — it injects fresh random noise at every step, so the image keeps changing as you raise the step count and never fully settles, and a locked seed does not reproduce it exactly. Pick Euler when you need repeatability, Euler a when you want the drift.
Euler a or DPM++ 2M Karras — which should I use?
DPM++ 2M Karras for most work: it is a higher-order deterministic solver, so it reaches good quality in 20–30 steps and repeats reliably with a fixed seed. Euler a only when you specifically want variety — being ancestral, it keeps producing a different picture on every run and will not settle even at high step counts, which is useful for exploring and awkward for iterating.
What is the difference between a sampler and a scheduler?
The terms are often used interchangeably. Strictly, the scheduler defines the noise timetable across steps and the sampler is the solver that walks it in reverse; most tools bundle them together under one "sampler" or "scheduler" menu.
How many sampling steps do I need?
It depends on the sampler. High-order samplers like DPM++ 2M Karras look great at 20–30 steps, DDIM often uses 20–50, and consistency samplers such as LCM work in 1–8. Beyond a point, more steps add time without visible improvement.
Do I need to choose a sampler in Twin AI?
No. Twin AI picks a tuned sampler and step count for each model automatically, so a plain description is enough. Just upload photos or type a prompt in /create/photo.