
dit_diffusers
Diffusion and generative1,916 ops749.8M params
Diffusion with a plain transformer over latent patches instead of a U-Net; bigger DiT, lower FID.
Diffusion and generative · 1,916 operations Checked
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.
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
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.
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
@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},
}