Stable Diffusion

Exploring Samplers in Stable Diffusion: Types, Approaches, and Practical Differences

Bill Cava/

Every Stable Diffusion image starts as pure noise and gets cleaned up a little at a time. The sampler is the method that decides how to take each of those steps.

Change the sampler and you change the path from noise to image. That is why the same prompt and seed can come out sharper, softer, or a completely different picture depending on which one you pick.

The names look like alphabet soup, Euler a, DPM++ 2M Karras, DDIM, UniPC, but they sort into a few families with real, predictable differences. This guide covers what a sampler actually is, the two families that matter, how the schedule changes things, and which one to reach for.

What is a sampler in Stable Diffusion?

A diffusion model does not paint an image in one shot. It starts from random noise and, over a set number of steps, predicts and removes a little of that noise each time until a clean image is left. The sampler is the numerical method that runs that loop. It decides how big each denoising step is and how the model's predictions carry from one step to the next.

Underneath, denoising is a differential equation, and each sampler is a different solver for it. Some are simple and fast, some are higher-order and more accurate per step, some add a little randomness along the way.

That is the whole reason there are so many. They are different trade-offs of speed, quality, and predictability on the same underlying problem.

Two knobs travel with the sampler: the number of steps (how many times it denoises) and the schedule (how much noise it plans to remove at each step). Both change the result as much as the sampler name does.

The two families: ancestral and deterministic

The single most useful distinction is ancestral versus deterministic. It is the difference that actually shows up in your images.

  • Deterministic samplers (Euler, DDIM, DPM++ 2M, DPM++ Karras, Heun, UniPC) follow the denoising path straight down. Give them the same prompt, seed, and settings and they converge toward one specific image. Add more steps and they refine that same image rather than change it.
  • Ancestral samplers (the ones with an "a", like Euler a, plus the SDE variants) inject a small amount of fresh random noise at every step. They are more exploratory and often a touch more detailed, but they never fully settle: change the step count and you get a different image, not just a cleaner one.

That "a" is worth memorizing. Ancestral means "keeps adding noise," which means "keeps changing." If you want a result you can reproduce and refine, use a deterministic sampler. If you want variety and happy accidents, use an ancestral one.

What the Karras schedule changes

The schedule is the list of noise levels the sampler steps through on its way down. The default schedule spaces those levels evenly. The Karras schedule, from a 2022 paper by Karras and colleagues, spaces them so more of the steps land in the low-noise region near the end, where fine detail actually forms.

The practical effect: Karras variants tend to look cleaner and more detailed in fewer steps. That is why "DPM++ 2M Karras" is such a common recommendation. In newer versions of Automatic1111 you pick the sampler and the schedule separately, so you can put a Karras schedule under most samplers.

The samplers, side by side

Here is one prompt at one fixed seed, run through six samplers at 25 steps. Only the sampler changed.

The same wizard portrait generated by six samplers (Euler a, DPM++ 2M, DPM++ Karras, DDIM, Euler, Heun) at the same prompt and seed. Five of them look nearly identical; Euler a shows a different composition.
One prompt, one seed, six samplers at 25 steps. The deterministic five land in almost the same image; the ancestral Euler a wanders to a different composition. Generated with SDXL for this post.

Look at what converges and what does not. The deterministic samplers (DPM++ 2M, DPM++ Karras, DDIM, Euler, Heun) land in almost the same image: same pose, same hat, tiny differences in the fine detail. The ancestral Euler a wandered off to a different composition entirely. That is the two families in one picture.

The takeaway is freeing. At a normal step count, the choice between DPM++ 2M, DDIM, and Euler is mostly a choice of speed and small texture differences, not a different image. Where the sampler really bites is at low step counts, and in whether more steps refine or reroll.

How many sampling steps do you actually need?

Steps are where the real difference lives, and the answer depends on the family. Here is Euler a (ancestral) and DPM++ 2M (deterministic), each at 8, 15, 25, and 40 steps.

A grid: Euler a on top and DPM++ 2M on the bottom, each at 8, 15, 25, and 40 steps. Euler a produces a different image at every step count; DPM++ 2M is rough at 8 steps, then nearly identical from 15 to 40.
Same prompt and seed, two samplers, four step counts. DPM++ 2M converges by 15 to 25 steps and barely changes after. Euler a produces a genuinely different image at every step count.

Read each row. DPM++ 2M is rough and oversaturated at 8 steps (too few to resolve), clean by 15, and then barely changes from 25 to 40. It has converged, and extra steps are wasted compute.

Euler a never settles. Each step count gives a genuinely different image, because the added noise reshuffles the result every time.

So the rule of thumb. For deterministic samplers, 20 to 30 steps is the sweet spot, and going higher rarely helps. For ancestral samplers, more steps is not "better," it is "different," so pick a step count you like and keep it fixed for reproducibility.

Which sampler should you use?

There is no single best sampler, but there is a sensible default and a short list of when to switch. In rough order of usefulness:

  • DPM++ 2M Karras is the all-around default. Fast, high quality, and converged by 20 to 25 steps. If you only learn one, learn this.
  • Euler a is the explorer. Fast, creative, slightly more detailed, and great for a first pass when you want variety. Just remember its output moves with the step count.
  • DDIM is the reliable workhorse for img2img and inpainting. Deterministic, fast, forgiving, and with a long track record.
  • DPM++ SDE Karras is the quality pick when you can spare the time. It is ancestral, so it is slower and less reproducible, but it resolves fine detail well.
  • UniPC converges fast at very low step counts (10 to 15), which makes it handy when speed matters more than the last few percent of quality.
  • Heun is a higher-order, more accurate solver, but it runs the model twice per step, so it is roughly half the speed of Euler for a small quality gain. Rarely worth it over DPM++ 2M.
  • Euler and PNDM are the plain, dependable defaults from earlier Stable Diffusion. They still work fine; DPM++ 2M just does the same job in fewer steps.

If you want a single starting point: DPM++ 2M Karras at 25 steps for finals, Euler a at 20 steps for exploring. Change only when one of the cases above applies.

The short version

Samplers look intimidating and mostly are not. There are two families that matter (ancestral wanders, deterministic converges), one schedule worth knowing (Karras, for cleaner detail in fewer steps), and one honest fact that saves a lot of fiddling: at a normal step count, the deterministic samplers land in nearly the same place. Pick DPM++ 2M Karras, set 20 to 30 steps, and spend your attention on the prompt instead.

Which sampler renders a figure is a small lever. Fixing exactly how that figure stands is a bigger one, and that is what ControlNet OpenPose is for; keeping a character consistent across images is where a LoRA earns its keep.

If you are past dialing settings by hand and trying to make Stable Diffusion dependable inside a product, that is the harder half, and it is what we do. Let's talk.

Frequently asked

What is a sampler in Stable Diffusion?
A sampler is the algorithm that turns random noise into an image.
A sampler is the algorithm that turns random noise into an image. Stable Diffusion generates by starting from noise and removing a little at each of a set number of steps; the sampler is the numerical method that runs that loop and decides how big each denoising step is. Different samplers are different solvers for the same problem, trading off speed, quality, and how predictable the result is.
What is the difference between ancestral and deterministic samplers?
Deterministic samplers (Euler, DDIM, DPM++ 2M) follow the denoising path straight down and converge to one image; add more steps and they refine that same image.
Deterministic samplers (Euler, DDIM, DPM++ 2M) follow the denoising path straight down and converge to one image; add more steps and they refine that same image. Ancestral samplers (the ones with an 'a', like Euler a) inject fresh random noise at every step, so they are more varied but never settle: change the step count and you get a different image, not just a cleaner one.
What is the best sampler for Stable Diffusion?
There is no single best, but DPM++ 2M Karras is the sensible default: fast, high quality, and converged by 20 to 25 steps.
There is no single best, but DPM++ 2M Karras is the sensible default: fast, high quality, and converged by 20 to 25 steps. Use Euler a when you want fast creative variety, and DDIM for img2img and inpainting. At a normal step count the deterministic samplers produce nearly the same image, so the choice among them is mostly speed and small texture differences.
How many sampling steps do you need?
For deterministic samplers, 20 to 30 steps is the sweet spot; they converge in that range and extra steps are mostly wasted compute.
For deterministic samplers, 20 to 30 steps is the sweet spot; they converge in that range and extra steps are mostly wasted compute. Below about 12 to 15 steps most samplers look undercooked. Ancestral samplers never converge, so more steps just gives a different image, not a better one, which means you should pick a step count and keep it fixed for reproducibility.
What is the Karras schedule?
The schedule is the sequence of noise levels the sampler steps through.
The schedule is the sequence of noise levels the sampler steps through. The Karras schedule, from a 2022 paper, spaces those levels so more steps land in the low-noise region near the end where fine detail forms. The effect is cleaner, more detailed results in fewer steps, which is why DPM++ 2M Karras is such a common recommendation.
Is Euler a or DPM++ 2M better?
They do different jobs. Euler a is ancestral: fast and creative, good for exploring, but its output changes with the step count.
They do different jobs. Euler a is ancestral: fast and creative, good for exploring, but its output changes with the step count. DPM++ 2M is deterministic: it converges to a stable image you can reproduce and refine, and it is the better default for finals. Use Euler a to find a direction, then DPM++ 2M Karras to lock it in.
Work with us

Let’s build it together.

We turn clever prototypes into production systems people can rely on. If you’re building with agents and want a hand making it real, leave your email and we’ll be in touch.

Straight to the team. No spam.