Diffusion Models · 5 Interactives

The Drunk Walk and the Straight Shot

A trained diffusion model tells you which way "less noisy" is. But how you walk that direction is a separate choice made at sampling time. DDPM stumbles home in a thousand tiny stochastic steps, re-adding noise as it goes; DDIM takes the same map and strides home deterministically — and can skip most of the steps. Same model. Wildly different rides. Drive both below.

① Two ways home② The step slider③ Same seed twice④ The 10× race⑤ Waxy & samey
EP 01

Two ways home — same model, same starting noise

Each dot is a sample starting as pure Gaussian noise; the hollow circles are the 12 modes the "trained" model knows (its data lives on this ring). Both panels use the identical denoiser and identical starting noise. Left: DDPM — every step denoises a little, then injects fresh noise back, so the traced paths stagger like a drunk. Right: DDIM — zero re-noising, so the same three highlighted particles glide in near-straight lines.

The "model" here is the exact analytic denoiser for a 12-mode toy distribution — a perfectly trained network, in miniature. Both use the DDIM-family update rule; DDPM takes η=1 with the original paper's σt²=βt noise, DDIM takes η=0.

✓ The punchline: both arrive at the ring (miss numbers above are computed live — DDPM keeps a thin stochastic fuzz, DDIM lands cleaner). Sampling strategy is a free choice you make after training — Stable Diffusion ships one model and lets the scheduler dropdown (DDIM, Euler, DPM++…) pick the walk.
EP 02

The step slider — who survives on a budget?

Here is where the two diverge hard. Drag the step budget from 200 down to 3 and watch the final clouds. DDPM's noise-injection is calibrated for tiny steps — starve it and the injected noise never gets cleaned up, leaving fuzz everywhere. DDIM degrades gracefully: fewer steps just means straighter, longer jumps along the same path.

"miss" = mean distance from each of the 120 samples to its nearest mode, computed live. Lower is sharper. Try 200, then 15, then 4.

The asymmetry: ✓ at 15–30 steps DDIM's miss barely moves while ✗ DDPM's blows up — exactly why "fast" diffusion pipelines in 2021–22 were DDIM-style. Below ~8 steps both suffer, which is why today's few-step models need distillation, not just a better walk.
EP 03

The reproducibility test — run the same seed twice

Fix the starting noise. Run each sampler twice. DDIM is a pure function of the starting noise: run A (dots) and run B (rings) land pixel-identical, every time. DDPM rolls fresh dice at every step: same start, different endings. Click the button repeatedly — the DDIM distance never leaves zero.

Distance shown is the mean gap between run A and run B endpoints across 40 samples — computed, not asserted.

✓ Why artists care: DDIM's determinism means a seed is a address — you can reuse it, interpolate between seeds, or invert a real image back to its noise (DDIM inversion, the backbone of many image-editing methods). DDPM's randomness makes seeds unrepeatable — a feature for diversity, a bug for control.
EP 04

The 10× race — 20 steps against 200

The claim that made DDIM famous: 10× fewer steps, same quality. Race them live — DDPM gets its full 200 steps, DDIM gets 20. Every step costs one full network evaluation (the expensive part), so watch the NFE counters: DDIM crosses the finish line while DDPM is still 90% of the way from home. Then press the second button to see what happens if you just starve DDPM to 20 instead.

In real pipelines each step is a full U-Net/DiT forward pass — hundreds of ms of GPU. Step count ≈ latency ≈ cost.

✓ 20 vs 200 at similar miss is the whole reason DDIM exists — it made diffusion usable in products. ✗ And the hobbled run shows it's not "fewer steps are fine"; it's DDIM's deterministic update that makes fewer steps fine.
EP 05

The fine print — waxy at 4 steps, samey forever

DDIM's two honest failure modes. Left — waxiness: push its budget to 3–6 steps and giant jumps land on the average of several modes: samples get pulled inside the ring, off every real mode — the particle version of the oversmoothed, plastic-skin look of too-few-step generations. Right — sameness: launch 16 runs from ONE starting point. DDIM: sixteen identical outcomes, one mode. DDPM: the same start scatters across many modes.

"pull toward center" measures how far inside the ring (radius 1.0) the samples collapse; "distinct modes" counts unique nearest modes across the 16 runs.

The real-world translation: ✗ very-low-step DDIM renders come out waxy and detail-free because big deterministic jumps average over possibilities; ✗ and for a fixed seed DDIM can only ever give you one image, while DDPM-style stochastic samplers turn one starting noise into a family of variations. ✓ That trade — speed and control vs. per-seed diversity — is exactly the scheduler menu you see in every Stable Diffusion UI.
Keep playing
▶
Generative Models
Noise Schedules
How fast you add noise matters as much as the model
▶
Generative Models
Score Matching
Follow the arrows that point back to the data