Diffusion
Image generators do not paint a picture stroke by stroke. They start from pure random noise and remove a little of it at a time until a clear image appears.
During training the model watches clean images have noise added step by step, and learns to predict and subtract that noise. To generate, it runs the process backwards: begin with static, estimate what noise to remove, repeat over many steps. A text prompt steers each step so the emerging image matches the words. Drag the slider to watch structure surface from noise.
denoising step 0/8
Variants & real-world flavors
DDPM (2020) is the founding recipe: destroy images with gradual noise, train a network to reverse each step, generate by running the reversal from pure static — originally over a thousand steps. Samplers like DDIM cut that to dozens. Latent diffusion (the idea behind Stable Diffusion) runs the whole process in a compressed latent space instead of pixel space, slashing compute and putting image generation on consumer GPUs. Classifier-free guidance is the knob that trades diversity for prompt fidelity. Flow matching reframes generation as learning a straight-line flow from noise to data — fewer steps, cleaner math — and consistency/distillation methods now push toward single-step generation. Video generators are diffusion plus temporal attention (see the Video & Audio lesson).
Check yourself
The model begins with nothing but random static. How does repeatedly removing noise end in a specific shape?
Go deeper (free): Jay Alammar — The Illustrated Stable Diffusion ↗