Diffusion models have become the leading technology behind popular AI image generators like Stable Diffusion, DALL·E, and Midjourney. These models start with pure random static—essentially noise—and gradually transform it into a coherent image. The process involves two main phases: forward diffusion and reverse diffusion.
In forward diffusion, the model systematically adds noise to a training image over multiple steps until it becomes indistinguishable from random static. The reverse process then learns to denoise step by step, effectively reconstructing the original image from noise. During generation, the model begins with random noise and applies the learned reverse process to produce a new image.
The key innovation lies in the training objective: instead of directly predicting the image, the model learns to predict the noise added at each step. This approach, combined with techniques like score functions and Langevin dynamics, allows for stable and high-quality generation.
Latent diffusion, as used in Stable Diffusion, further enhances efficiency by performing the diffusion process in a compressed latent space rather than pixel space. Text conditioning is achieved through classifier-free guidance, where the model learns to generate images that match a given text prompt without needing an explicit classifier.
Beyond images, diffusion models have been extended to generate audio, video, and even protein structures, demonstrating their versatility. This architecture has effectively supplanted earlier generative adversarial networks (GANs) due to its superior stability and output quality.