DDIM: Fast Deterministic Diffusion Sampling
DDIM turns diffusion sampling deterministic and 10-50x faster with strided steps, keeping DDPM quality while enabling latent interpolation and editing.
Primary source: Denoising Diffusion Implicit Models (arXiv:2010.02502)
Diffusion models generate images by reversing a gradual noising process, but the original DDPM sampler needs around a thousand sequential neural-network evaluations to produce a single image. That made sampling slow — minutes per image on a GPU — and held diffusion back from interactive use just as it was overtaking GANs on quality.
The 2020 paper Denoising Diffusion Implicit Models by Song, Meng, and Ermon solved the speed problem with a strikingly clean insight: the DDPM training objective does not actually depend on the sampler being Markovian. By generalizing the forward process, the authors derived a family of samplers that reuse a pretrained DDPM model with no retraining, run 10 to 50 times faster, and can be made fully deterministic.
The core idea
A DDPM defines a forward chain that adds a little Gaussian noise at each of T steps, ending at pure noise, and trains a network to predict the noise added at each step. Sampling then reverses this chain one step at a time, injecting fresh random noise at every step. DDIM asks: what if the reverse steps did not have to be small, stochastic, and Markovian?
The paper shows that many different forward processes — including non-Markovian ones — share exactly the same training objective, because the objective only depends on the marginals q(x_t \mid x_0), not on the full joint distribution. This freedom lets DDIM define reverse steps conditioned directly on the predicted clean image x_0, skipping timesteps at will. A model trained with 1000 steps can be sampled in 100, 50, or even 20 strided steps with only gradual quality loss.
The deterministic update
Each DDIM step first uses the noise predictor to estimate the clean image, then points the next iterate partway toward that estimate and partway along the predicted noise direction. With \alpha_t the noise schedule and \epsilon_\theta the pretrained network:
where \hat{x}_0 is the predicted clean image and \sigma_t is a free variance parameter. Setting \sigma_t = 0 removes all randomness, giving the deterministic DDIM update: each noisy image maps to exactly one cleaner image. A scalar \eta interpolates between deterministic sampling (\eta = 0) and DDPM-like stochastic sampling (\eta = 1), so practitioners can trade diversity against reproducibility with one knob.
Skipping steps with strided sampling
Because DDIM steps are defined for any pair of timesteps, you can sample on a short subsequence — say every 20th step — instead of the full chain. Each stride covers far more ground than a DDPM step because the update aims at the predicted clean image rather than taking a small denoising step plus noise. In practice, 50 DDIM steps roughly match 1000 DDPM steps on standard metrics, a 20x speedup, and even 10–20 steps give recognizable images.
This works without any retraining because the only learned component is the original DDPM noise predictor. The sampler is purely an inference-time choice: the same checkpoint supports slow stochastic sampling, fast deterministic sampling, and everything in between.
Inversion and latent semantics
Determinism buys more than reproducibility. A deterministic DDIM sampler is an invertible map: run it forward from noise to image, or run the update rule in reverse to encode a real image back into its latent noise. That inversion underpins a large family of later diffusion editing methods.
It also gives diffusion latents GAN-like semantics. Interpolating between two inverted noises produces smooth, meaningful image interpolations, and the paper shows that directions in this space support consistent manipulations. Stochastic DDPM sampling has no such clean latent structure, since every trajectory is reshaped by injected noise.
What the paper showed
On CIFAR-10 and CelebA, the authors showed that 100-step DDIM roughly matches 1000-step DDPM sample quality as measured by FID, while 20-step DDIM already beats 100-step DDPM. Wall-clock speedups scaled nearly linearly with the step reduction. They also demonstrated reconstruction through inversion and smooth interpolations that stochastic sampling could not produce. These results held across datasets without touching the trained weights, confirming that the sampler, not the model, was the bottleneck.
Legacy and limitations
DDIM became the default sampler for an era of diffusion models, including latent diffusion systems like Stable Diffusion, where 50-step deterministic sampling was the standard recipe for years. It also reframed diffusion as an ODE problem — the deterministic update is a discretization of a probability-flow ODE — which launched a wave of faster solvers such as DPM-Solver and consistency models.
Limitations remain. Quality still degrades as steps drop into the single digits, where distilled or consistency-style models do better. Deterministic sampling can also reduce diversity slightly relative to stochastic sampling at the same step count. And DDIM inherits whatever biases and failure modes the underlying DDPM has, since it only changes how the model is sampled, not what it learned. For fast, faithful, reproducible diffusion sampling from existing checkpoints, though, it remains the baseline everything else is compared against.
Source
- Song et al., Denoising Diffusion Implicit Models, 2020. arXiv:2010.02502
- Ho et al., Denoising Diffusion Probabilistic Models, 2020. arXiv:2006.11239
- Dhariwal & Nichol, Diffusion Models Beat GANs on Image Synthesis, 2021. arXiv:2105.05233
Want the next review in your inbox? The briefing collects them — at most one email a week. Read signup data and removal options.
Cite this report
@misc{knowyourml-ddim-denoising-diffusion-implicit-models
title = {DDIM: Fast Deterministic Diffusion Sampling},
author = {{Know Your ML}},
year = {2020},
howpublished = {\url{https://knowyourml.yunusemrevurgun.com/report.php?slug=ddim-denoising-diffusion-implicit-models}},
note = {AI-generated review of arXiv:2010.02502. Primary sources are listed on the page.}
}
Machine Learning Decision Toolkit
Turn this review into a decision: the Machine Learning Decision Toolkit packages the evaluation scorecards, workload templates and deployment checks behind model, provider and architecture choices.
References
- Denoising Diffusion Implicit Models (arXiv:2010.02502) — https://arxiv.org/abs/2010.02502
- Denoising Diffusion Probabilistic Models (arXiv:2006.11239) — https://arxiv.org/abs/2006.11239
- Diffusion Models Beat GANs on Image Synthesis (arXiv:2105.05233) — https://arxiv.org/abs/2105.05233
Frequently asked questions
Why is DDIM faster than DDPM sampling?
A DDPM reverse chain adds fresh noise at every step, so it must take small steps to stay on track. DDIM generalizes the forward process to a non-Markovian one whose reverse steps can be deterministic, allowing large strided jumps.
Can DDIM sample from a DDPM model without retraining?
Yes, with a caveat. DDIM reuses a pretrained DDPM noise predictor with no retraining, but quality degrades as the step count drops, so around 50-100 steps is the usual sweet spot.
What does the eta parameter control?
Setting eta to zero removes all stochasticity, making the sampler a deterministic map from noise to image. Larger eta values reintroduce noise, with eta = 1 recovering DDPM-like behavior.
How does DDIM enable image editing?
Deterministic DDIM defines an invertible mapping, so you can run it backward from a real image to its latent noise and forward again after edits. This inversion underpins many diffusion-based editing methods.
Beyond the paper
How to Remain Valuable When Intelligence Becomes Cheap
This report covered one more way the machine gets smarter. The companion eBook asks the question on the other side: which human advantages stay scarce — and valuable — when intelligence itself is cheap?