What is a diffusion model?
A diffusion model is the technology behind most AI image and video generators. It produces content by denoising. It begins with a frame of pure static and refines it over a series of steps, each one making the picture a little clearer, until the result matches the prompt.
How does a diffusion model work?
Training and generation run in opposite directions.
Training: learning to undo noise
- Take a real image from the training set.
- Add a small amount of random noise. Repeat until the image is pure static.
- Train a neural network to predict, at each step, the noise that was added.
Repeated over a very large number of images, this teaches the network how to turn a noisier image into a slightly cleaner one.
Generation: running it backwards
- Start from random noise.
- The network estimates the noise and removes some of it.
- Repeat for a set number of steps.
- A text prompt, converted to numbers, steers each step so that the emerging image matches the description.
Because every run starts from different noise, the same prompt gives a different image each time. Fixing the starting noise, known as the seed, reproduces a result.
Diffusion model vs large language model
| Diffusion model | Large language model | |
|---|---|---|
| Main output | Images, video, audio | Text and code |
| How it generates | Refines the whole output over many steps | Adds one token at a time, in order |
| Starting point | Random noise | The prompt |
| Typical products | Image and video generators | Chat assistants, coding tools |
The two are often combined. A language model may interpret or rewrite the prompt, and a diffusion model draws the picture. Some newer image generators use other methods entirely, so "AI image generator" and "diffusion model" are not synonyms.
What settings matter in practice?
- Steps: more steps usually mean more detail and a longer wait.
- Guidance strength: how strictly the image follows the prompt. Too high can look harsh and artificial.
- Seed: the starting noise. Reusing it helps keep a series consistent.
- Reference inputs: an existing image, a sketch or a pose that constrains the result.
What are diffusion models used for?
Beyond images from text, they are used to edit photos, extend a picture past its edges, raise resolution, and generate video, music and speech. Related methods are used in science, for example to propose molecular structures.