ddim (denoising diffusion implicit models)
**DDIM (Denoising Diffusion Implicit Models)** is an accelerated sampling method for diffusion models that defines a family of non-Markovian diffusion processes sharing the same training objective as DDPM but enabling deterministic sampling and variable-step generation without retraining. DDIM converts the stochastic DDPM sampling process into a deterministic ODE-based process by removing the noise injection at each step, enabling high-quality generation in 10-50 steps instead of DDPM's 1000 steps.
**Why DDIM Matters in AI/ML:**
DDIM provides the **foundational acceleration technique** for diffusion model sampling, demonstrating that the same trained model can generate high-quality samples in 10-50× fewer steps through deterministic, non-Markovian inference, making diffusion models practical for real-world applications.
• **Deterministic sampling** — DDIM's update rule x_{t-1} = √(α_{t-1})·predicted_x₀ + √(1-α_{t-1}-σ²_t)·predicted_noise + σ_t·ε becomes deterministic when σ_t = 0, producing a fixed output for a given initial noise—enabling consistent generation, interpolation, and inversion
• **Subsequence scheduling** — DDIM can skip steps by using a subsequence {τ₁, τ₂, ..., τ_S} of the original T timesteps, generating in S << T steps; the model trained on T=1000 can generate with S=50, 20, or even 10 steps without retraining
• **DDIM inversion** — The deterministic process is invertible: given a real image x₀, running the forward process produces a latent z_T that, when decoded with DDIM, reconstructs the original image; this inversion enables image editing, style transfer, and semantic manipulation in the latent space
• **Interpolation in latent space** — Because DDIM is deterministic, interpolating between two latent codes z_T^(a) and z_T^(b) produces smooth, semantically meaningful transitions in image space, unlike DDPM where stochastic sampling prevents meaningful interpolation
• **Probability flow ODE** — DDIM sampling corresponds to solving the probability flow ODE of the diffusion process using the Euler method; this connection motivated higher-order ODE solvers (DPM-Solver, PNDM) that further reduce sampling steps
| Property | DDIM | DDPM |
|----------|------|------|
| Sampling Type | Deterministic (σ=0) or stochastic | Always stochastic |
| Steps Required | 10-50 | 1000 |
| Reconstruction | Exact (deterministic) | Varies each run |
| Interpolation | Meaningful | Not meaningful |
| Inversion | Yes (deterministic forward) | No (stochastic) |
| Training | Same as DDPM (no change) | Standard DSM/ε-pred |
| Quality at Few Steps | Good | Poor |
**DDIM is the seminal work that unlocked practical diffusion model deployment by demonstrating that trained DDPM models can generate high-quality samples deterministically in a fraction of the original steps, establishing the theoretical foundation for all subsequent diffusion sampling accelerations and enabling the latent space manipulations (inversion, interpolation, editing) that power modern AI image editing tools.**