How it works · 23 of 37 Core
How do diffusion models make images and video?
How AI makes images and video
Diffusion: Start from random noise and remove it step by step, guided by the prompt, until a picture emerges.
Loading the animation…
Say it like this A diffusion model starts from random noise and, step by step, removes the noise it thinks is there, steered by your prompt, until a picture is left.
Under the hood — for builders
- What each step does
- The model never paints: each step, it guesses the noise on the screen, and a little of that guess is wiped away.
- How it learns
- It learns the other way round: cover a real photo in a random amount of noise and ask it to guess the noise.
- More steps, better pictures, up to a point
- Like the dial: more steps give a better picture, but after about 50 the gain is small.
- Steering by the prompt
- Each step it guesses twice, with and without the prompt, then leans further toward the prompt: pictures come out far closer to real ones.
- Work on a small sketch
- Modern models clean a small compressed sketch of the picture, then enlarge it: far less work per step.
- How it's done today
- Newer models take a straighter path from noise to picture and need far fewer steps; some need just one.
- Watch out
- It can hand back near-copies of pictures it trained on, mostly ones it saw many times: researchers pulled 109 out of Stable Diffusion from 175 million tries.
- Sources
- Ho, Jain, Abbeel (UC Berkeley), Denoising Diffusion Probabilistic Models, 2020 (arXiv 2006.11239) · Song, Meng, Ermon (Stanford), Denoising Diffusion Implicit Models, 2020 (arXiv 2010.02502) · Ho & Salimans (Google), Classifier-Free Diffusion Guidance, 2022 (arXiv 2207.12598) · Rombach et al., High-Resolution Image Synthesis with Latent Diffusion Models, 2022 (arXiv 2112.10752) · Esser et al. (Stability AI), Scaling Rectified Flow Transformers for High-Resolution Image Synthesis, 2024 (arXiv 2403.03206) · Sauer et al. (Stability AI), Adversarial Diffusion Distillation, 2023 (arXiv 2311.17042) · Carlini et al., Extracting Training Data from Diffusion Models, 2023 (arXiv 2301.13188).
What happens in the diffusion animation, step by step?
- An image model starts from pure static: random dots, no picture yet. The prompt: a red bicycle.
- Each step, the model guesses which dots are noise and wipes a little away, steered by the prompt.
- Rough shapes come first, details last. After 50 steps: a sharp red bicycle.
- Your turn: drag the dial back to static, then forward again.
- New static, same prompt: a different red bicycle.
- Same static, new prompt: the same steps make a red kite.
What everyday example explains diffusion?
A sculptor revealing a statue from a block.
Why should a team care about diffusion?
Behind image and video generators.