Scaling Rectified Flow Transformers for High-Resolution Image Synthesis

Patrick Esser, Sumith Kulal, Andreas Blattmann, Rahim Entezari, Jonas Müller, Harry Saini, Yam Levi, Dominik Lorenz, Axel Sauer, Frederic Boesel, Dustin Podell, Tim Dockhorn, Zion English, Robin Rombach

Introduction

This paper introduces Stable Diffusion 3, a state-of-the-art text-to-image model that significantly advances the field through the use of Rectified Flow (RF) and a novel Multimodal Diffusion Transformer (MM-DiT) architecture. By scaling the model up to 8 billion parameters and refining noise sampling techniques, the authors achieve substantial improvements in typography, prompt following, and overall image quality, outperforming both open and closed-source competitors like DALL-E 3 and Midjourney v6.

The Core Challenge

While diffusion models are the current standard for generative media, they frequently struggle with complex spatial reasoning and precise typography—rendering legible text within an image. Most existing models utilize "curved" forward paths to transform data into noise, which can lead to computational inefficiencies during the sampling process.

Furthermore, traditional architectures often treat text as a secondary conditioning signal. This unidirectional flow of information limits the model's ability to deeply integrate the relationship between textual descriptions and visual elements. The researchers aimed to develop a more efficient mathematical formulation and a scalable architecture that treats text and images as bidirectional partners.

Methodology: MM-DiT and Rectified Flow

The researchers introduced several key innovations to address these limitations:

  1. Multimodal Diffusion Transformer (MM-DiT): This architecture serves as the model's "brain." Unlike standard transformers, it employs separate weights for text and image tokens. These two streams are joined during the attention operation, enabling a bidirectional flow of information. Text tokens can "see" image tokens and vice versa, which is critical for the model's superior spelling and layout capabilities.
  2. Rectified Flow (RF): RF connects data and noise in a straight line rather than a curve. This "straightness" makes the model significantly more sample-efficient, allowing for high-quality generation in fewer steps.
  3. Improved Noise Sampling: Training is most effective when the model focuses on "perceptually relevant" scales. The authors introduced Logit-Normal sampling, biasing training toward intermediate timesteps where critical structural information is learned.
  4. QK-Normalization: To maintain training stability at the 8B parameter scale, RMSNorm is applied to the Query and Key vectors in the attention mechanism, preventing "logit growth" that can lead to training failures.
The MM-DiT architecture (a) provides an overview of all components, while (b) details the bidirectional information flow within a single block.

Training and Datasets

The study involved a massive scale-up using diverse datasets:

  • ImageNet and CC12M: Used for initial systematic studies on diffusion formulations.
  • COCO-2014: Utilized for validation and calculating FID/CLIP scores.
  • Synthetic Captions: The authors used CogVLM to re-caption their large-scale training set. They discovered that a 50/50 mix of original and synthetic captions significantly improved the model's ability to follow complex prompts.

Key Insights and Results

  • Efficiency of Straight Paths: Rectified Flow's straight trajectories are inherently more efficient. RF models maintain high performance even when the number of sampling steps is drastically reduced.
  • Scaling Laws: Text-to-image models follow predictable scaling trends. Lower validation loss during training correlates strongly with higher human preference ratings and better performance on benchmarks like GenEval.
  • Typography and Spatial Reasoning: By allowing text tokens to be influenced by the evolving image, the model can effectively "plan" letter placement and spelling. In blind side-by-side evaluations, the 8B model outperformed DALL-E 3 and SDXL in visual quality and typography.
High-resolution samples demonstrating the model's advanced capabilities in typography, prompt following, and complex spatial arrangements.

Limitations and Future Work

While powerful, the model relies on a large T5 text encoder (4.7B parameters), which requires significant VRAM. Although the model performs well without T5 for many prompts, complex text rendering is diminished without it. Future work will explore extending this architecture to video generation and continuing to push scaling laws to even larger models, as performance has not yet shown signs of saturation.

Summary updated

BibTeX
@inproceedings{esser2024scaling,
  author = {Patrick Esser and Sumith Kulal and Andreas Blattmann and Rahim Entezari and Jonas Müller and Harry Saini and Yam Levi and Dominik Lorenz and Axel Sauer and Frederic Boesel and Dustin Podell and Tim Dockhorn and Zion English and Robin Rombach},
  title = {{Scaling Rectified Flow Transformers for High-Resolution Image Synthesis}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=FPnUhsQJ5B},
}
Figure