loading

Diffusion Model — Step-by-Step Visualization

hardAIMLGenerative AIDeep LearningDiffusion

Step through the diffusion forward process — watch a clean data point progressively corrupted by Gaussian noise until it becomes pure noise.

Algorithm Pattern

Gradual Gaussian Corruption

Key Idea

The diffusion forward process adds Gaussian noise at each step. After T steps, any data becomes pure N(0,1) noise. The model learns to REVERSE this process — denoising step by step to generate new data.

Step-by-Step Approach

  1. Choose a noise schedule: β_1, β_2, …, β_T (small positive values).
  2. x_t = √α_t · x_{t-1} + √(1−α_t) · ε where ε ~ N(0,1), α_t = 1−β_t.
  3. Equivalently: x_t = √ᾱ_t · x_0 + √(1−ᾱ_t) · ε where ᾱ_t = Π α_i.
  4. Signal component √ᾱ_t decreases; noise component √(1−ᾱ_t) increases.
  5. Model learns to predict ε given x_t and t — then reverses to get x_0.

Common Gotchas

  • DDPM uses T=1000 steps; DDIM achieves good quality in 50 steps.
  • The model is trained to predict the NOISE ε, not the clean image directly.
  • Stable Diffusion applies diffusion in a compressed latent space, not pixel space.

Related Problems