DiG: Scalable and Efficient Diffusion Models with Gated Linear Attention

Lianghui Zhu, Zilong Huang, Bencheng Liao, Jun Hao Liew, Hanshu Yan, Jiashi Feng, Xinggang Wang

Abstract

Diffusion models based on the Transformer architecture (DiT) have become the standard for high-quality image generation. However, their quadratic computational complexity poses a significant barrier to high-resolution synthesis. This paper introduces Diffusion Gated Linear Attention (DiG), a novel backbone that replaces standard self-attention with a sub-quadratic Gated Linear Attention mechanism. By incorporating a Spatial Reorient & Enhancement Module (SREM), DiG effectively handles 2D spatial data while maintaining linear-time complexity. Experimental results demonstrate that DiG achieves up to a 4.2x speedup and a 75.7% reduction in GPU memory usage at high resolutions compared to traditional DiT models, without sacrificing image quality.

Introduction

The Diffusion Transformer (DiT) has established itself as a premier architecture for generative modeling. However, its reliance on softmax self-attention introduces a quadratic complexity bottleneck: doubling the image resolution results in a fourfold increase in computational and memory requirements. This scaling behavior makes ultra-high-resolution image and video generation prohibitively expensive.

Methodology: Diffusion Gated Linear Attention

To overcome these limitations, we propose Diffusion Gated Linear Attention (DiG). DiG leverages Gated Linear Attention (GLA), a sub-quadratic alternative to Transformers, and adapts it for 2D visual tasks through several key innovations:

  • Spatial Reorient & Enhancement Module (SREM): Standard GLA is designed for 1D causal sequences. SREM introduces a multi-directional, block-by-block scanning strategy (covering four directions) to ensure every patch captures global 2D context.
  • Local Feature Boosting: By integrating depth-wise convolutions (DWConv), DiG gains an inductive bias for local spatial patterns, ensuring the preservation of fine-grained details often lost in pure linear models.
  • Identity Initialization: New convolutional layers are initialized as identity matrices to ensure training stability and a smooth transition from pre-trained states.

Efficiency and Scaling

The primary advantage of DiG is its superior scaling performance. As shown in the performance analysis, the efficiency gap between DiG and traditional DiT models widens significantly as resolution increases. While DiT models often encounter "Out of Memory" (OOM) errors at high resolutions, DiG remains operational and efficient.

Speed and GPU memory comparison across resolutions. DiG-S/2 demonstrates significant advantages over DiT-S/2, particularly at resolutions above 1024px.

At a resolution of 1792×1792, DiG-S/2 is 2.5× faster and requires 75.7% less GPU memory than its DiT counterpart. Furthermore, DiG-XL/2 outperforms recent Mamba-based diffusion models by a factor of 4.2× at 1024×1024 resolution.

Visual Quality and Benchmarks

Despite the drastic reduction in computational overhead, DiG maintains competitive generative performance. On the ImageNet 256×256 benchmark, DiG-XL/2 achieves an FID score of 2.07, matching or exceeding the quality of standard DiT models. The model successfully generates high-fidelity images across a wide variety of classes, from animals to complex landscapes.

Qualitative results of DiG across various categories, demonstrating high-fidelity image generation across diverse subjects.

Conclusion

DiG represents a significant step toward efficient high-resolution generative modeling. By breaking the quadratic complexity barrier of Transformers, it enables the synthesis of high-fidelity images and potentially long-form video on standard hardware. Future work will explore scaling DiG to larger foundation-model regimes and expanding its application to temporal domains like video generation.

Summary updated

BibTeX
@inproceedings{zhu2025dig,
  author = {Lianghui Zhu and Zilong Huang and Bencheng Liao and Jun Hao Liew and Hanshu Yan and Jiashi Feng and Xinggang Wang},
  title = {{DiG: Scalable and Efficient Diffusion Models with Gated Linear Attention}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.00718},
}
Figure