Skip to main content
QUICK REVIEW

[Paper Review] Scalable Diffusion Models with Transformers

William Peebles, Saining Xie|arXiv (Cornell University)|Dec 19, 2022
Advanced Neuroimaging Techniques and ApplicationsMedicine39 citations
TL;DR

This paper replaces U-Net with a transformer backbone in latent diffusion models, showing that higher Gflops-based DiT models yield better FID scores and that DiT-XL/2 achieves state-of-the-art FID on 256×256 ImageNet and strong results on 512×512.

ABSTRACT

We explore a new class of diffusion models based on the transformer architecture. We train latent diffusion models of images, replacing the commonly-used U-Net backbone with a transformer that operates on latent patches. We analyze the scalability of our Diffusion Transformers (DiTs) through the lens of forward pass complexity as measured by Gflops. We find that DiTs with higher Gflops -- through increased transformer depth/width or increased number of input tokens -- consistently have lower FID. In addition to possessing good scalability properties, our largest DiT-XL/2 models outperform all prior diffusion models on the class-conditional ImageNet 512x512 and 256x256 benchmarks, achieving a state-of-the-art FID of 2.27 on the latter.

Motivation & Objective

  • Assess whether transformer backbones can replace U-Net in diffusion models without sacrificing performance.
  • Analyze the scaling behavior of Diffusion Transformers (DiTs) using forward pass compute (Gflops) as a key metric.
  • Demonstrate the impact of model size, patch size, and conditioning mechanisms on sample quality.
  • Evaluate DiTs on class-conditional ImageNet at 256×256 and 512×512 resolutions to establish state-of-the-art baselines.

Proposed method

  • Replace U-Net with a transformer operating on latent patches in latent diffusion models (LDMs).
  • Use patchify operation to convert latent representations into tokens for a ViT-style transformer backbone.
  • Explore four conditioning strategies (in-context tokens, cross-attention, adaLN, adaLN-Zero) and choose adaLN-Zero for efficiency and quality.
  • Train DiTs on ImageNet 256×256 and 512×512 within the LDM framework, using a pre-trained VAE encoder/decoder to operate in latent space.
  • Evaluate model performance primarily via FID-50K (with 250 sampling steps) and supplement with sFID, IS, Precision, and Recall, using EMA weights for inference.
Figure 2 : ImageNet generation with Diffusion Transformers (DiTs). Bubble area indicates the flops of the diffusion model. Left: FID-50K (lower is better) of our DiT models at 400K training iterations. Performance steadily improves in FID as model flops increase. Right: Our best model, DiT-XL/2, is
Figure 2 : ImageNet generation with Diffusion Transformers (DiTs). Bubble area indicates the flops of the diffusion model. Left: FID-50K (lower is better) of our DiT models at 400K training iterations. Performance steadily improves in FID as model flops increase. Right: Our best model, DiT-XL/2, is

Experimental results

Research questions

  • RQ1Can a transformer backbone match or surpass U-Net-based diffusion models in image generation quality within latent diffusion models?
  • RQ2How does increasing transformer forward-pass compute (Gflops) affect diffusion sample quality?
  • RQ3What conditioning mechanism provides the best trade-off between compute and sample quality in DiTs?
  • RQ4What is the state-of-the-art performance of DiTs on ImageNet at 256×256 and 512×512 resolutions when trained under the LDM framework?

Key findings

  • Diffusion Transformers (DiTs) show improved sample quality as Gflops increase, with higher depth/width or more tokens yielding better FID.
  • DiT-XL/2 achieves state-of-the-art FID of 2.27 on ImageNet 256×256 with classifier-free guidance, outperforming prior diffusion models.
  • On 512×512 ImageNet, DiT-XL/2 achieves FID of 3.04, surpassing many prior diffusion methods while using substantially fewer Gflops than pixel-space diffusion models.
  • Among conditioning strategies, adaLN-Zero provides the best FID with the least additional Gflops, outperforming in-context and cross-attention designs.
  • LDM-based DiTs demonstrate strong compute efficiency: DiT-XL/2 is compute-efficient relative to LDM-4/8 and far more so than pixel-space ADM variants.
  • Scaling DiT models yields consistent gains in FID across training stages and patch sizes, indicating parameter counts are not the sole predictor of quality.
Figure 3 : The Diffusion Transformer (DiT) architecture. Left: We train conditional latent DiT models. The input latent is decomposed into patches and processed by several DiT blocks. Right: Details of our DiT blocks. We experiment with variants of standard transformer blocks that incorporate condit
Figure 3 : The Diffusion Transformer (DiT) architecture. Left: We train conditional latent DiT models. The input latent is decomposed into patches and processed by several DiT blocks. Right: Details of our DiT blocks. We experiment with variants of standard transformer blocks that incorporate condit

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.