About this course
A build-it-yourself course: no paper-parroting, no buzzwords. In every session an AI mentor
walks you through writing code, deriving formulas, and dragging sliders — building a
generative model from first principles. Our microscope is a 2D two-moons point cloud:
small enough that every step runs in seconds and is visible to the naked eye, yet real
enough that the math is exactly what Stable Diffusion and Sora run on. You'll melt data
into Gaussian noise step by step (and derive its closed form), train a tiny velocity field
that flows noise back onto the data manifold, then backfill the probability and integration
foundations, derive and run every formula of both flow matching and DDPM, learn to steer
generation (conditioning & guidance), and see exactly what engineering separates 2D toys
from real images. After this course, "diffusion model" is no longer an API to you — it's a
machine whose every screw you have tightened yourself.
What you'll learn
- Hand-implement the closed-form forward marginal, derive ᾱ_t, and watch a 2D cloud diffuse into a Gaussian
- Train a tiny-MLP velocity field and sample via Euler/Heun integration, flowing noise back onto the data manifold
- Derive the conditional flow matching loss and explain why regressing conditional velocities learns the marginal field
- Derive DDPM's Gaussian posterior and ε-parameterization, implement ancestral sampling and DDIM, and connect diffusion to flow matching
- Feed labels into the velocity field and implement classifier-free guidance with a single steering knob
- Account for what separates 2D toys from real images: dimensionality, U-Nets/attention, latent spaces and few-step distillation
Syllabus
1Toy Diffusion: Melt Data into Noise and Back2 sessions
2The Probability Toolbox: Distributions, Gaussians & Euler Integration3 sessions
3Flow Matching: the Velocity-Field Generative Model, Derived3 sessions
4Denoising Diffusion: DDPM, Scores & Two Ways Home0 sessions
Sessions are on the way.
5Controllable Generation: Conditioning & Classifier-Free Guidance0 sessions
Sessions are on the way.
6Toward the Real World: from 2D Point Clouds to Image Generation0 sessions
Sessions are on the way.
Same series · 人工智能全透析
AI, End to End
Synthesized from the best material across the web — rebuild the core of AI from scratch, the efficient way.