Scalable Diffusion Models with Transformers

William Peebles, Saining Xie

2022 · ICCV

Scalable Diffusion Models with Transformers

Problem

Framing

U-Net backbones had driven diffusion progress, but scaling laws for transformer backbones in diffusion were unclear. DiT closes this gap by patchifying latent inputs and scaling a class-conditional transformer directly with compute, reaching ImageNet 256×\times256 FID 2.27 and 512×\times512 FID 3.04 with guidance.

Currently Used Methods

Foundational

Proposed Method

Architecture

DiT runs diffusion in Stable-Diffusion-style latent space. A latent of size 32×32×432 \times 32 \times 4 is patchified into tokens, processed by NN transformer blocks at hidden size dd, then projected back to predict noise and diagonal covariance. Conditioning on timestep tt and class label yy enters each block through adaLN-Zero; this beats cross-attention and token concatenation.

Verified architecture: latent diffusion transformer with patchify, repeated DiT blocks, and three conditioning variants; the highlighted best block uses adaLN-Zero scale/shift modulation around self-attention and MLP.

Loss / Objective

The model keeps the standard diffusion training target in latent space.

L=Ex,ϵ,t[ϵϵθ(xt,t,y)2]L = \mathbb{E}_{\mathbf{x}, \boldsymbol{\epsilon}, t}\left[\|\boldsymbol{\epsilon} - \boldsymbol{\epsilon}_{\theta}(\mathbf{x}_t, t, y)\|^2\right]

Sampling Rule / Algorithm

For class-conditional sampling, DiT uses classifier-free guidance.

ϵ~θ(xt,t,y)=ϵθ(xt,t,)+w(ϵθ(xt,t,y)ϵθ(xt,t,))\tilde{\boldsymbol{\epsilon}}_{\theta}(\mathbf{x}_t, t, y) = \boldsymbol{\epsilon}_{\theta}(\mathbf{x}_t, t, \varnothing) + w\left(\boldsymbol{\epsilon}_{\theta}(\mathbf{x}_t, t, y) - \boldsymbol{\epsilon}_{\theta}(\mathbf{x}_t, t, \varnothing)\right)

Training Procedure

Evaluation

Datasets

Metrics

Headline results

Verified results figure: two bubble charts showing lower FID with larger DiT compute on ImageNet 256\times256, and DiT-XL/2-G outperforming ADM-U-G and LDM guidance baselines at better compute efficiency.

Ablations

Method Strengths and Weaknesses

Strengths

Weaknesses

Suggestions from the authors

Links

Prior Papers

Further Papers