Log inStart free
LESSON 25.08 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW

Diffusion Transformers

Watch a transformer turn noisy image patches into a picture.


Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 3 controls and 3 checks, in this lesson and every other.

Go Pro · $8.25/mo
EXPLAINER · 25.08 · DIT BAYSTEP 4 OF 8 · 3-WORD PROMPT
01
Stage 1 of 6 · Noisy input
Sampling starts from pure noise and takes 8 steps. At step 4, the input x₄ is about half noise.
Explain it simply

You see one moment of sampling. The model began with pure static and cleans it a little at each of eight steps. At step four, the input is still about half noise. The chips under the image show the step and the prompt words.

An 8 by 8 grid of noisy pixels, step 4 of 8, prompt “ring top left”.

noisy input, tokensstep, conditionpredicted image
x₄, step 4 of 8step 4ringtopleftx₄ = √ᾱ₄ x₀ + √(1 − ᾱ₄) ε, ᾱ₄ = 0.49x₄, step 4 of 8step 4ringtopleftx₄ = √ᾱ₄ x₀ + √(1 − ᾱ₄) ε, ᾱ₄ = 0.49
Toy: the 8×8 images of 25.C1, a 2-block DiT trained here, 8 steps
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
xt=αˉt x0+1−αˉt ε\sy{x}{data}{x_t} = \sqrt{\sy{ab}{param}{\bar\alpha_t}}\,x_0 + \sqrt{1-\sy{ab}{param}{\bar\alpha_t}}\,\sy{e}{grad}{\varepsilon}
αˉ4=0.49,  0.49=0.70,  0.51=0.71\bar\alpha_4 = 0.49,\; \sqrt{0.49} = 0.70,\; \sqrt{0.51} = 0.71

The input mixes a clean image and noise in a fixed ratio.

Common mix-ups

MYTHEach patch can be denoised on its own.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
3 CHECKS · PRO
Q01If you set the patch size to 4 px, how many tokens does x₄ make?

Make your guess, then test it in the diagram. All 3 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
  • 5 more stages and 3 live controls
  • 2 mix-up cards and 3 predict-then-reveal checks
  • Watch it as a narrated video, in three voices
  • Every Pro lesson and capstone · 656 in total

$99 a year, or $15 a month. Cancel any time.