diffusion models overview
Diffusion models generate images by learning to reverse a gradual noising process. **Forward process**: Gradually add Gaussian noise to image over T steps until it becomes pure noise. Defined by noise schedule β₁...βT. **Reverse process**: Learn to denoise at each step. Neural network predicts noise (or clean image) given noisy input and timestep. **Training**: Add noise to real images at random timesteps, train U-Net to predict the added noise (or original), MSE loss between predicted and actual noise. **Sampling**: Start from random noise → iteratively denoise using learned model → each step recovers signal → final step produces clean image. **Noise schedules**: Linear, cosine, learned. Affect training and sample quality. **DDPM vs DDIM**: DDPM (stochastic sampling, 1000 steps), DDIM (deterministic, fewer steps, faster). **Architecture**: U-Net with attention, residual connections, timestep conditioning. **Conditioning**: Class labels, text embeddings (cross-attention), other signals. **Advantages over GANs**: More stable training, better mode coverage, easier to control. Foundation of modern image generation (Stable Diffusion, DALL-E, Midjourney).