Legacy Concept Lab
Diffusion, Score-Based Models & Flow Matching
Stable Diffusion: latent diffusion — DDPM in a VAE latent space
#9DiffusionGenerative Models
key equation
Phase 4: Generative modeling familiesConcept 9 of 100
Why It Matters for Modern Models
- Stable Diffusion: latent diffusion — DDPM in a VAE latent space
- Sora: diffusion transformer over 3D spacetime patches
- Flow-matching and rectified flows enable one-step or few-step generation
What Tutorials Skip
What is still poorly explained in textbooks and papers:
- Intuitive explanation that denoising is learning ∇ₓ log pₜ(x) (scores), and how reverse-time SDE sampling corresponds to "walking uphill in log-density space"
- Visual/interactive demonstrations of different probability paths (diffusion vs optimal transport)
Interactive Visualization
Core Math (Optional Deep Dive)
If you want intuition first, start with the key equation and the visualization. Come back here for the full walkthrough.
Key Equation
Forward diffusion adds noise:
Model learns to predict noise via MSE:
Score-based SDE view: forward SDE . Reverse-time SDE uses score .
Flow matching: train vector field to match the "true" conditional field (often optimal transport / straight lines).