All models

dit

Diffusion with a plain transformer over latent patches instead of a U-Net; bigger DiT, lower FID.

Diffusion and generative · 1,916 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (114 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Family
dit
Parameters
749.8M
Operations
1,916
Framework
PyTorch
Recurrent
No
Published
ICCV 2023
Cited by
2,282 (as of 29 October 2026)
Authors
William Peebles, Saining Xie
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m11798
Graph hash
b83785b475b107ccfcbaeaccb21f3831cc0c2c2efe32654c88cf863eba89fd0b
Skeleton hash
cb1896efe645ccf5aa73a836e66314fc245579412d396b6b634b68811637c4dd
Architecture hash
1e3836468352187c1e872c9d3b62d2d6d1e25cee5fce99a8b4b515fed7dd2600
Diagram SHA-256
2cb1e72a688c9294352aa7bab5abd49c777ab6e86d89b4dfdaedd400267a4066
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

About this model's family

DiT, the Diffusion Transformer, is a latent diffusion model of images that replaces the commonly-used U-Net backbone with a transformer that operates on latent patches. The paper's point is scaling: DiTs with higher Gflops, through increased transformer depth/width or increased number of input tokens, consistently have lower FID. The argument is that the U-Net inductive bias is not crucial to the performance of diffusion models, and they can be readily replaced with standard designs such as transformers.

The input is a spatial latent, 32 × 32 × 4 for a 256 × 256 × 3 image, and the first layer, patchify, converts it into a sequence of T tokens by linearly embedding each patch. Conditioning on the timestep and class label goes through adaLN-Zero: the layer norms regress their scale and shift from the sum of the embedding vectors of t and c, and a per-block gate is initialized to zero so every block starts as the identity function. Among the conditioning designs tried, the adaLN-Zero block yields lower FID than both cross-attention and in-context conditioning while being the most compute-efficient. After the final block a linear decoder turns each token into a p×p×2C tensor, giving both an output noise prediction and an output diagonal covariance prediction at the input's spatial shape.

All four captured members are the DiT-XL/2 configuration, 28 layers with hidden size 1152 and 16 heads at patch size 2, built with random weights; the doubled output channels on the graph are that noise-plus-covariance pair. The largest DiT-XL/2 models outperform all prior diffusion models on class-conditional ImageNet 512x512 and 256x256, with a state-of-the-art FID of 2.27 on the latter.

Key idea. Showing that diffusion models do not need the U-Net: a ViT-style transformer over latent patches with adaLN-Zero conditioning scales smoothly, with lower FID as Gflops grow.

  • DiT
  • Diffusion Transformer
  • DiT-XL/2
  • Scalable Diffusion Models with Transformers
  • latent diffusion
  • adaLN-Zero
  • class-conditional ImageNet
  • diffusers DiTTransformer2DModel
  • Peebles
  • Xie

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{peebles2023scalablediffusionmodelstransformers,
      title={Scalable Diffusion Models with Transformers}, 
      author={William Peebles and Saining Xie},
      year={2023},
      eprint={2212.09748},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2212.09748}, 
}