All projects Generative Models

Implicit Diffusion (DDIM)

Deterministic, few-step sampling from a diffusion model — without retraining.

Study & implementation 2023 DDIMODE samplerFast sampling
Implicit Diffusion (DDIM) diagram

Motivation

Standard diffusion sampling is slow — hundreds of stochastic steps. Denoising Diffusion Implicit Models keep the same training objective but replace the sampler with a non-Markovian, deterministic process, cutting the number of steps by an order of magnitude while preserving sample quality.

Method

DDIM defines a family of inference processes that share the marginals of the diffusion forward chain but need not be Markovian. Setting the injected noise to zero yields a deterministic map from latent to sample — effectively an ODE integrator over the same score field.

\[ x_{t-1} = \sqrt{\bar\alpha_{t-1}}\,\hat{x}_0 + \sqrt{1-\bar\alpha_{t-1}}\;\epsilon_\theta(x_t,t) \]

Mathematical core

Because sampling becomes deterministic, the latent code acquires a meaningful geometry: interpolating in latent space produces smooth semantic transitions, and the forward map is (approximately) invertible. This is the bridge from diffusion to the probability-flow ODE and to continuous normalizing flows.