Scalable High-Resolution Pixel-Space Image Synthesis with Hourglass Diffusion Transformers

Katherine Crowson, Stefan Andreas Baumann, Alex Birch, Tanishq Mathew Abraham, Daniel Z Kaplan, Enrico Shippole

Abstract

The Hourglass Diffusion Transformer (HDiT) introduces a hierarchical, pure-transformer architecture designed for linear scaling with pixel count. By integrating global attention at low resolutions with local neighborhood attention at high resolutions, HDiT enables high-quality, megapixel-scale image synthesis directly in pixel space. This approach bypasses the need for latent autoencoders or complex multi-stage pipelines, achieving state-of-the-art results on high-resolution benchmarks like FFHQ-1024.

Introduction: The Quadratic Bottleneck

Generating high-resolution images, such as 1024x1024 pixels, is traditionally computationally prohibitive for standard Diffusion Transformers (DiTs). The primary obstacle is the self-attention mechanism, which scales quadratically ($O(n^2)$) with the number of tokens (pixels). This "quadratic bottleneck" has forced most state-of-the-art models, like Stable Diffusion, to operate in a compressed latent space. While efficient, latent diffusion can lose fine-grained details, and alternative cascaded models introduce significant architectural complexity.

HDiT addresses this by bringing the scalability of Transformers directly to pixel space, achieving linear ($O(n)$) complexity.

The Hourglass Diffusion Transformer Architecture

The HDiT architecture is inspired by the hierarchical structure of convolutional U-Nets but is implemented entirely using Transformer blocks.

The HDiT architecture uses a hierarchical hourglass structure with pixel shuffling and neighborhood attention to achieve linear scaling.

Key Architectural Components

  • Hourglass Structure: The model processes images through multiple levels. The encoder progressively "shuffles" pixels to reduce spatial dimensions while increasing channel depth. After reaching a "global" bottleneck, the decoder reverses this process.
  • Global vs. Local Attention: To maintain efficiency, HDiT employs expensive global self-attention only at the lowest resolutions (e.g., 16x16 tokens). At higher resolutions, it utilizes Neighborhood Attention, where each token only attends to its immediate spatial neighbors.
  • Modern Transformer Refinements: The architecture incorporates elements from Large Language Models (LLMs) like LLaMA, including Rotary Positional Embeddings (RoPE), GEGLU activation functions, and RMSNorm.
  • Learnable Skip Connections: Instead of simple addition, HDiT uses learnable linear interpolation ("lerp") to merge information between the encoder and decoder, significantly improving performance.

Scaling and Performance

The most significant advantage of HDiT is its efficiency at scale. As resolution increases, the computational cost of HDiT grows linearly, whereas standard pixel-space Transformers experience a quadratic explosion in FLOPs.

Computational cost comparison showing HDiT's linear scaling versus the quadratic scaling of standard pixel-space DiT.

Key Results

  • FFHQ-1024 Benchmark: HDiT established a new state-of-the-art for diffusion models on the FFHQ-1024 benchmark with an FID of 5.23, a massive improvement over the previous baseline (NCSN++) of 53.52.
  • ImageNet-256: A 557M parameter HDiT achieved an FID of 6.92, outperforming standard pixel-space models like ADM without requiring classifier-free guidance.
  • Efficiency: At 1024x1024 resolution, HDiT requires less than 1% of the GFLOPs compared to a standard pixel-space DiT.

Discussion and Future Work

HDiT demonstrates that global coherence can be maintained through low-resolution global attention, while fine-grained textures are effectively captured by local neighborhood attention. This hierarchical approach proves that convolutions are not strictly necessary for the benefits of a U-Net structure.

Future research directions include applying the HDiT architecture to latent diffusion to further enhance efficiency or exploring its application to other high-dimensional modalities like video and audio. While the current results are impressive, the authors note that minimal hyperparameter tuning was performed, suggesting significant potential for further performance gains.

Summary updated

BibTeX
@inproceedings{crowson2024scalable,
  author = {Katherine Crowson and Stefan Andreas Baumann and Alex Birch and Tanishq Mathew Abraham and Daniel Z Kaplan and Enrico Shippole},
  title = {{Scalable High-Resolution Pixel-Space Image Synthesis with Hourglass Diffusion Transformers}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=WRIn2HmtBS},
}
Figure