An image generation model creates new visuals rather than merely classifying existing images. A text prompt can guide what it creates. One approach, diffusion, starts with random noise and repeatedly removes predicted noise until an image takes shape—more like a sculptor carving away unwanted material than a painter filling a blank canvas. section 1.23 section 12.1
From noise to a tree
Imagine asking for a tree. The starting image is an unclear patch of random noise. Early denoising steps reveal a rough silhouette; later steps clarify the trunk and canopy, then refine bark and leaves. The model works toward a recognizable image through many small changes, not one finished drawing. section 12.2
A diffusion model learns that process in stages:
- Collect and clean images with captions. The range and quality of these pairs shape what the model can depict: a model trained only on X-rays cannot be expected to paint a dog in a sunflower field. section 12.27 section 12.4
- Turn the training material into numerical representations and add noise to clean images in stages. These noisy versions provide examples for learning to reverse the process. section 12.3
- Use a U-Net to predict the added noise in a noisy image, guided by its caption. Compare that prediction with the actual noise and update the model using the resulting loss. section 12.3
- After training, start from fresh random noise and repeatedly subtract predicted noise, using the user’s prompt as a guide. section 12.3
Figure 12.7 A workflow for training a diffusion model
The workflow figure links image preparation, deliberate noising, noise-prediction training, and generation from random noise. section 12.3
The same basic approach can support quick concept-art variations, advertising visuals, product mockups, and images tailored to an article or presentation. Results depend on the training data: a narrow collection may suit a specialized task, while a diverse one supports a wider range of scenes. Large-scale systems use far more data and larger networks than a small learning implementation, but follow the same core denoising principle. section 12.37 section 12.38 section 12.39 section 12.27

