Deep Learning · Step 6 of 8 · 8 min
Diffusion and generative images
You understand, at a high level, how image generators turn noise into pictures.
Learn to remove noise
A diffusion model is trained with a simple game. Take a real image, add a little random noise, and ask the network to predict the noise that was added. Repeat at every noise level, from a slight blur to pure static.
Once trained, you run the game backwards. Start from pure noise and remove a bit at each step. After dozens of steps, an image appears that looks like it came from the training data.
Steering with text
To follow a prompt, the denoising network also reads a text embedding, produced by a text encoder trained to link words and images. Guidance strength controls how hard the model leans toward the prompt.
Most modern systems denoise in a compressed latent space rather than raw pixels, which makes them far cheaper. Stable Diffusion popularised this. Newer models replace the original U-Net with a transformer and use related training methods such as flow matching, but the noise-to-image idea is the same.
Use with care
The same tools make convincing fakes. Many providers now attach provenance labels, such as C2PA content credentials, or invisible watermarks to generated images. Treat generated images of real people and events with suspicion, and check licences before using a model or its outputs commercially.
Try it
Watch the steps
- 1.Open a free image generation demo Space on huggingface.co (search Spaces for "stable diffusion" or "FLUX").
- 2.Generate the same prompt with very few steps, then with the default. Compare the results.
- 3.Change only the seed and keep everything else the same. Notice that the seed fixes the starting noise.