Diffusion Models
Neural networks that create images by gradually removing noise from a random set of pixels.
Simple Analogy
Imagine taking a clear photograph and adding noise step by step until only 'snow' of random dots remains.
A diffusion model learns to do the opposite: start with 'snow' and gradually turn it into a meaningful image.
How It Works
Training
- Take a real image.
- Add noise.
- Ask the model to predict the noise that was added.
- Update weights.
Generation
flowchart LR
A[Random noise] --> B[Step 1]
B --> C[Step 2]
C --> D[Step N]
D --> E[Image]
Role of the Text Prompt
A prompt like 'a cat astronaut on Mars' is converted into embeddings and guides the noise removal process to the desired result.
Popular Models
- Stable Diffusion — open-source, locally;
- DALL-E — from OpenAI;
- Midjourney — popular service;
- Flux — modern open-source models.
What Sets It Apart from GAN
Previously, images were often generated by GAN — two networks competed. Diffusion models are usually more stable and diverse.