Diffusion models

Destroying data is easy; add a little noise, a thousand times. A diffusion model learns to undo one small step of that destruction, and generates by undoing all of them, starting from pure noise. The forward process in closed form, DDPM's noise-prediction loss derived, noise schedules and sampling steps, DDIM, classifier-free guidance, and latent diffusion, which is how text-to-image systems work.

65 min

After this lesson you can

  • Write the forward noising process and derive the closed form of
  • Explain why the reverse step is approximately Gaussian, and state the posterior
  • Derive how the ELBO for a diffusion model reduces to predicting the added noise, and what drops
  • Implement DDPM training and ancestral sampling, and explain what DDIM changes
  • Explain classifier-free guidance, and how latent diffusion with cross-attention turns text into images

In this lesson

  1. The forward process: destroying data, one step at a time
  2. The reverse process: undoing one small step
  3. The loss: predict the noise
  4. Sampling
  5. Noise schedules
  6. Steering: conditioning and guidance
  7. How text-to-image systems work: latent diffusion
  8. The code
  9. In the papers

This lesson is part of Descent Pro

Descent Pro unlocks every lesson on the route, from base camp to the summit. Every plan starts with a free trial.

Descent Pro

Start your free trial to keep reading

This lesson, and every other lesson on the route, is part of Descent Pro. Every plan starts with a free trial, and students with a .edu email get longer. Cancel before the trial ends and you pay nothing.