9 modules · 4 parts · ~122 min
Diffusion
Nine modules on diffusion models for people who have trained one and want the derivations to actually connect. The forward process and why it is designed the way it is, three equivalent views of the objective, the sampler as an ODE solver, guidance, latent and flow-matching formulations, and where inference time actually goes.
Part FThe process
What is actually being learned.
- 01The forward process, and why it is GaussianThe closed-form marginal is the whole design. Tweedie turns denoising into score estimation, and that identity is what makes everything downstream work.
- 02One network, four parameterizationsε, x₀, v and score are affine reparameterizations of the same quantity. Choosing between them is choosing an implicit loss weighting, which is choosing where capacity goes.
- 03Schedules, SNR, and why resolution changes everythinglog-SNR is the real time axis. The same schedule destroys far less information at higher resolution, which is why schedules must shift with image size.
Part GSampling
The generative half, as numerics.
- 04Sampling is solving an ODEThe reverse SDE has a deterministic twin with the same marginals. Once you see the probability-flow ODE, DDIM stops being a trick and becomes Euler.
- 05Solvers: why twenty steps is enoughLocal truncation error, semi-linear structure, and the exponential integrators that make DPM-Solver work. Where the remaining error actually lives.
Part HControl
Steering the trajectory.
- 06Guidance, and what it does to the distributionCFG does not sample a sharpened posterior — it samples from no normalized distribution at all. Why it works anyway, and what it costs.
- 07Conditioning and controlCross-attention, adapters, ControlNet and attention injection — four places to inject a signal, and what each one can and cannot control.
Part IIn practice
Latents, distillation, and cost.
- 08Latent diffusion and what the VAE costsCompressing 48× before diffusing is why any of this is affordable. The autoencoder sets a hard ceiling on quality that no amount of diffusion training can lift.
- 09Few-step models and the inference budgetSolvers get you to twenty steps; only changing the model gets you to four. Distillation, flow matching, and where the milliseconds actually go.