Sampler (Diffusion) — Definition, How It Works & Common Types
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 decides how many steps to take and how large each one is, which sets the trade-off between generation speed and image quality.
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.

Common samplers, compared
You will meet a handful of samplers again and again. They differ mainly in speed, in whether they add fresh noise each step, and in how many steps they need:
- Euler — a simple, fast first-order sampler that converges cleanly; a reliable default.
- Euler a (ancestral) — adds random noise at every step, so the image keeps changing as you add steps and never fully settles; good for creative variety.
- DDIM — a deterministic sampler from the 2020 DDIM paper; fast and consistent, popular for img2img and animation.
- DPM++ 2M Karras — a high-order sampler that gives excellent quality in only 20–30 steps; a modern go-to default.
- UniPC — a unified predictor–corrector solver that can produce good images in as few as 5–10 steps.
- LCM / Turbo — consistency-based samplers built for 1–8 step generation, trading a little quality for near-instant results.
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.
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 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.