Diffusion Transformer (DiT in Latent Space)
Diffusion2023 · UC Berkeley / NYU (Peebles & Xie)ViT patchified latent score-matching with AdaLN-Zero conditioning
Intuition & Key Idea
ELI5 GuideWhy this model was invented and how it transforms generation
"Replaces old complex convolutional U-Nets with pure, scalable Transformer blocks operating directly on compressed image patches."
Replacing a specialized mechanical film camera with a modern modular digital sensor that scales smoothly as you add more compute power.
Higher FLOPs consistently yields lower Fréchet Inception Distance (FID).
Modulates layer norm scales and shifts directly from timestep and prompt.
Operates in VAE latent space (32x32 patches) rather than raw pixels.
The universal foundational architecture for modern video and image generation.
1. Sample Gaussian Latent Noise Prior z_T
Draw initial latent noise z_T from standard normal distribution matching the 8x downsampled resolution (e.g. 4 × 64 × 64 for a 512×512 image).
Operating in 8x latent space saves 64x compute compared to high-resolution pixel space diffusion.
Starting from random Gaussian white noise, the neural network predicts and subtracts the noise component over iterative steps.
GPU Memory Hierarchy & HBM Traffic for this Step
HBM ↔ SRAM on-chipInitial noise written to GPU VRAM buffer
Active Tensor Dimensions & Memory Shapes
Proved that visual diffusion scales with compute like LLMs (more FLOPs directly yields lower FID). Became the foundational architecture behind Sora, Stable Diffusion 3, Flux.1, and modern video generation.
Training Objective:Latent Noise Prediction MSE: 𝔼_{t, z_0, ε}[ ||ε - DiT_θ(z_t, t, c)||^2 ]
Inference Bottleneck:O(K) transformer forward passes over fixed patch tokens (e.g. 20–50 steps)
Foundational & Breakthrough Papers for Diffusion Transformer (DiT in Latent Space)
Scalable Diffusion Models with Transformers (DiT)
William Peebles, Saining Xie (UC Berkeley / NYU)
High-Resolution Image Synthesis with Latent Diffusion Models
Rombach, Blattmann, Lorenz, Esser, Ommer (LMU Munich / Runway)