Skip to content
Optimal Lab

AI Engineering · interactive

How image generation works

A diffusion model learns one skill: look at a noisy picture and guess the noise in it. To make an image, start from pure noise and remove a little at a time, nudged toward the prompt. Change the number of steps and the guidance, and watch a 16 × 16 picture appear.

image, step 0/25 · t = 999
model’s guess of the clean image
noise level1.00
of “a house” in the final image
96%
shading crushed to black or white
0%

Pure noise. Press play to remove it in 25 steps.

Prompt

step 0 of 25
  1. 1

  2. 2

    Random noise, from a seed. The same seed and settings give the same picture; a new seed gives a new one.

    x at t = 999: random Gaussian noise, seed 7

  3. 3

  4. 4

  5. 5