Efficient Scaling of Diffusion Transformers for Text-to-Image Generation

Hao Li, Shamit Lal, Zhiheng Li, Yusheng Xie, Ying Wang, Yang Zou, Orchid Majumder, R. Manmatha, Zhuowen Tu, Stefano Ermon, Stefano Soatto, Ashwin Swaminathan · DOI

Introduction

The transition from Convolutional UNets to Diffusion Transformers (DiTs) has marked a significant shift in state-of-the-art text-to-image generation, powering models like Sora and Stable Diffusion 3. However, the industry has lacked a clear understanding of the scaling laws governing these architectures. This paper presents a rigorous empirical study comparing three major DiT designs—PixArt-α, LargeDiT, and U-ViT—to determine which architectural choices lead to superior performance as models and datasets grow.

Architectural Comparison and Methods

The researchers conducted a controlled scaling study, keeping the VAE, text encoder (OpenCLIP-H), and training recipes constant while varying the DiT backbone. They investigated three representative designs:

  1. PixArt-α: Uses cross-attention for text conditioning.
  2. LargeDiT: Incorporates LLaMA-style architectural tweaks.
  3. U-ViT: A "pure" transformer that treats time, text, and image patches as a single sequence of tokens. It is unique for its use of long skip connections between shallow and deep layers, similar to a traditional UNet.
Comparison of the three diffusion architectures: UNet-like (left), Cross-Attention DiT (middle), and Self-Attention DiT/U-ViT (right).

Models were scaled from 0.3B to 8B parameters, exploring both width (hidden dimension) and depth (transformer blocks). The study utilized massive datasets, including LensArt (250M pairs) and SSTK (totaling 600M pairs). A key innovation was the use of LensArt-Long, where short alt-text was replaced with detailed synthetic captions generated by LLaVA-v1.6-Mistral-7B to increase information density.

Key Insights: Why U-ViT Wins

The study identifies U-ViT as the clear winner in scaling efficiency. Unlike cross-attention models where text remains a static condition, U-ViT’s self-attention allows the model to refine text representations as it processes image patches. This effectively enables the transformer blocks to act as a fine-tuner for the text encoder.

Furthermore, the authors confirmed that long skip connections are essential; removing them significantly slows convergence and degrades final image quality. For image editing tasks like inpainting, the team found that "token concatenation"—appending condition tokens (like Canny maps) directly to the sequence—outperformed traditional channel-wise concatenation.

Performance and Results

The 2.3B parameter U-ViT model demonstrated remarkable results, matching or exceeding the performance of the 2.4B SDXL UNet on benchmarks such as TIFA (faithfulness) and ImageReward (human preference).

High-quality text-to-image samples generated by the scaled U-ViT model across diverse prompts.

Beyond quality, U-ViT proved significantly more efficient. Despite its theoretical compute requirements, the 2.3B U-ViT achieved 75% lower inference latency than SDXL at 256x256 resolution. It also showed a steeper performance gain when scaling from 250M to 600M images, suggesting it is better equipped to absorb massive amounts of data than its predecessors.

Conclusion

This research establishes U-ViT as a highly scalable and efficient backbone for diffusion models. By combining the strengths of self-attention with the structural advantages of skip connections, U-ViT outperforms industry standards in both quality and speed. Future work may extend these scaling laws to high-resolution training and video generation, where U-ViT’s token-based architecture is naturally suited.

Summary updated

BibTeX
@misc{li2024efficient,
  author = {Hao Li and Shamit Lal and Zhiheng Li and Yusheng Xie and Ying Wang and Yang Zou and Orchid Majumder and R. Manmatha and Zhuowen Tu and Stefano Ermon and Stefano Soatto and Ashwin Swaminathan},
  title = {{Efficient Scaling of Diffusion Transformers for Text-to-Image Generation}},
  year = {2024},
  eprint = {2412.12391},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.12391},
}
Figure