Type a sentence, get an image. It feels like magic, but the mechanism behind modern image generators — diffusion — rests on one clever, understandable idea: learn to remove noise.
Start from static
Imagine taking a clear photo and gradually adding random noise until it's pure static. A diffusion model learns to run that process backwards: given a noisy image, predict what to remove to make it slightly clearer. Do that step by step, starting from pure random noise, and a coherent image gradually emerges — like a photo developing.
The model never "draws." It sculpts — starting from noise and repeatedly removing what doesn't belong until an image remains.
Where the prompt comes in
Your text prompt guides the denoising. At each step, the model is steered toward removing noise in a way consistent with "a cat wearing a hat." The prompt shapes what emerges from the static. This is why the same prompt gives different images each time — it starts from different random noise.
Why diffusion won
Diffusion beat earlier approaches (like GANs) because it's stable to train, produces diverse high-quality results, and offers a natural quality-speed knob: more denoising steps means higher quality, fewer means faster. Modern systems run diffusion in a compressed latent space for efficiency, and use transformer backbones (DiT) that scale predictably.
Beyond images
The same recipe — corrupt data, learn to reverse it — isn't specific to pictures. It generates audio, video, 3D shapes, even molecules. Diffusion turned out to be a general method for sampling from complex distributions, which is why it shows up everywhere. Images just made it famous.