Fuzz & Un-Fuzz
Draw a picture and bury it in static. Then watch Robo clean fresh static back into a picture, one step at a time.
Draw something on the left (or pick a doodle). Then slide the fuzz knob and watch your picture disappear!
Your picturestep 0
Robo's guess—
clear picturepure static
Cleaning film
Top: the picture. Bottom: Robo's guess. Tap a frame.Robo's picture book
The only pictures Robo has ever seen. Bars = Robo's guess. Tap to hide or show.
How it works
Start with a picture
To a computer a picture is a grid of little colored squares. Each square is just a number.
Add static, bit by bit
Each step sprinkles a little more fuzz on top. After enough steps, it's only static. Messing up is easy!
Guess what's underneath
Robo looks at the fuzzy mess and guesses the clean picture. At first the guess is blurry. That's OK!
Clean a tiny bit, repeat
Robo wipes off a little static toward its guess, then guesses again. Step by step, a picture appears.
What just happened?
- Adding static is easy: a little more fuzz each step until the picture is gone.
- Cleaning is the clever part: at every step Robo guesses the clean picture, then wipes off a little static toward that guess.
- The film shows the guess going from a blurry mix to one sharp picture.
- Robo can only rebuild pictures from its book. Real AIs learn from millions of pictures, so they can mix ideas into new ones.
For grown-ups: what's really going on
- Forward process. Each picture is a 32×32×3 vector
x₀in [−1, 1]. Noising follows the DDPM closed formxₜ = √ᾱₜ·x₀ + √(1−ᾱₜ)·ε, ε ~ 𝒩(0, I), with the cosine scheduleᾱₜ = cos²((t/T + s)/(1+s) · π/2), T = 100. The ε is fixed, so scrubbing the slider is smooth and deterministic. - The denoiser is exact, not a neural net. Real diffusion models train a network to predict ε (or x₀). Here the "training set" is the picture book, so we can write down the optimal denoiser:
E[x₀ | xₜ] = Σᵢ wᵢ·xᵢwithwᵢ = softmax(−‖xₜ − √ᾱₜ·xᵢ‖² / 2(1−ᾱₜ)). The bars under each page are those wᵢ. - Sampling. "Smooth" is DDIM (η = 0, a probability-flow ODE discretisation); "Jiggly" is ancestral DDPM-style sampling (η = 1), which injects fresh noise each step. Very few steps make the early, blurry average guesses stick.
- Why the guess locks on so fast. Pictures live in 3,072 dimensions, so even at fairly high noise the likelihoods of different book pages differ by huge factors and the softmax becomes nearly one-hot. Learned denoisers stay blurrier for longer.
- Memorisation. Because the optimal denoiser for a finite dataset just reproduces training images, this sampler can only output pages from the book. Real models are deliberately imperfect (finite capacity, smooth inductive biases), which is what lets them generalise and make new pictures. Text-to-image models also add a text condition and work in a compressed latent space.
- Further reading: Diffusion Explainer (Polo Club), Ho et al. 2020 "Denoising Diffusion Probabilistic Models", Song et al. 2021 "DDIM", Nichol & Dhariwal 2021 (cosine schedule).