Watch random noise learn the direction of data.

Diffusion models corrupt data forward and learn to reverse that process. Move through time, change the variance schedule and guidance, and watch a score field pull particles toward structure.

Open the score field
xₜ → x₀
1.00signal/noise
0.42denoising error
500timestep
2.4sample spread

Diffusion learns a local direction, then integrates many directions.

Forward process

A fixed Markov chain gradually mixes clean data with Gaussian noise. Closed-form sampling reaches any timestep directly during training.

xₜ = √ᾱₜx₀ + √(1−ᾱₜ)ε

Noise prediction

A neural network receives the noisy sample and timestep, then predicts noise, clean data, velocity, or a related score parameterization.

ε̂ = εθ(xₜ,t,c)

Reverse integration

A sampler uses predictions to move from noise toward data. More steps reduce discretization error but increase latency.

xₜ₋₁ = sampler(xₜ, ε̂, t)

Guidance changes the path through probability.

Classifier-free guidance combines two predictions

The conditional direction is amplified relative to an unconditional prediction. Higher guidance strengthens prompt alignment but can reduce diversity and create artifacts.

Schedules allocate learning difficulty

The beta or log-SNR schedule determines how quickly information is destroyed. Cosine-like schedules preserve useful signal longer than a naive linear schedule in many settings.

Fast samplers approximate the same reverse process

DDIM, DPM-Solver, flow-style and consistency methods reduce neural evaluations. Fewer steps require better numerical trajectories and can trade detail for speed.

Denoising questions

Does the model memorize the exact reverse noise?

No. It learns a conditional statistical prediction over noisy training examples. Sampling combines many local predictions with fresh initial noise.

Why can the same prompt produce different outputs?

Different initial noise seeds and stochastic sampler choices follow different plausible paths under the learned conditional distribution.

Is guidance scale a probability?

No. It is an extrapolation coefficient between conditional and unconditional model predictions.

Primary sources

Ho et al. (2020) introduced denoising diffusion probabilistic models. Nichol and Dhariwal (2021) improved objectives and schedules. Classifier-Free Diffusion Guidance describes conditional guidance without a separate classifier. DDIM develops non-Markovian faster sampling.