LiT: Delving into a Simple Linear Diffusion Transformer for Image Generation

Jiahao Wang, Ning Kang, Lewei Yao, Mengzhao Chen, Chengyue Wu, Songyang Zhang, Shuchen Xue, Yong Liu, Taiqiang Wu, Xihui Liu, Kaipeng Zhang, Shifeng Zhang, Wenqi Shao, Zhenguo Li, Ping Luo

TL;DR

The Linear Diffusion Transformer (LiT) provides a highly efficient recipe to convert computationally heavy, pre-trained Diffusion Transformers (DiTs) into fast, linear-attention models. By optimizing attention head counts, adding depth-wise convolutions, and using a novel hybrid distillation strategy, LiT slashes high-resolution generation latency by up to 55% and memory usage by over 70%. Remarkably, it matches the image quality of standard DiTs while requiring up to 80% fewer training steps.

What Problem Does This Paper Address?

Diffusion Transformers (DiTs) are the backbone of modern state-of-the-art image generation models. However, they suffer from a major scalability bottleneck: standard softmax self-attention scales quadratically ($O(N^2)$) with the sequence length (i.e., the number of image patches). As image resolution increases, the computational cost and GPU memory consumption skyrocket, making high-resolution deployment on consumer edge devices (like laptops or smartphones) impractical.

Linear attention offers a sub-quadratic alternative, but simply swapping it into a diffusion model usually results in a severe drop in image quality. The authors of this paper set out to find a clean, practical roadmap to successfully transition a fully trained standard DiT into a pure linear attention model without sacrificing generation performance or requiring massive, from-scratch training resources.

Methods

The authors introduce LiT (Linear Diffusion Transformer) by establishing five practical guidelines that bridge the gap between quadratic self-attention and linear attention:

  1. Restoring Locality with Depth-wise Convolution (DWC): Linear attention tends to smooth out feature distributions, losing the sharp local context needed to predict pixel-level noise. LiT fixes this by applying a simple 5×5 depth-wise convolution to the value matrix within the linear attention block.
  2. The Few-Head Design: Instead of using 6 to 16 attention heads (the standard for DiTs), LiT drastically reduces the head count to just 2 or 3.
  3. Weight Inheritance: LiT leverages the rich structural knowledge of a fully converged, pre-trained DiT by copying over its non-attention weights (such as Feed-Forward Networks and adaptive LayerNorm layers).
  4. Random Attention Initialization: Interestingly, the projection matrices ($Q, K, V, O$) are initialized randomly rather than copied from the teacher model, as the mathematical paradigms of linear and softmax attention are too fundamentally different.
  5. Hybrid Knowledge Distillation: To train the student linear model efficiently, a frozen teacher DiT provides supervision. Crucially, the distillation loss targets both the predicted noise and the variance of the reverse diffusion process.
Overall training and distillation pipeline of LiT

Datasets

The model was trained and evaluated using several standard and internal datasets:

  • ImageNet (256×256 and 512×512): Used for class-conditional image generation benchmarks to evaluate Frechet Inception Distance (FID) and Inception Score (IS).
  • Internal Text-to-Image Dataset: A dataset consisting of a mixture of long descriptive captions (60%) and short captions (40%) paired with high-resolution images, used to train the text-to-image variant adapted from PixArt-$\Sigma$.
  • GenEval: A specialized benchmark used to quantitatively evaluate text-to-image alignment and compositional image generation quality.

Key Insights and Ideas

  • The "Free Lunch" of Fewer Heads: In standard self-attention, changing the number of heads doesn't alter computational complexity. In linear attention, however, reducing the number of heads actually increases theoretical compute density (GMACs) per head while decreasing practical latency on hardware. This extra compute budget acts as a "free lunch" that significantly boosts image generation quality.
  • Functional Decoupling: The paper reveals that structural components of a transformer block (like FFNs) are functionally decoupled from the attention mechanism. This explains why a linear attention student can seamlessly inherit and exploit weights from a softmax attention teacher.
  • Variance Distillation is Crucial: When transferring knowledge to a linear model, supervising the noise prediction alone is insufficient. Moderately distilling the reverse-process variance helps the linear attention mechanism better handle the stochastic nature of diffusion generation.

Key Results

  • Drastic Training Speedups: On the ImageNet 256×256 benchmark, LiT-XL/2 achieved a highly competitive FID of 2.32 compared to the baseline DiT-XL/2's 2.27, but required only 20% of the original training steps (1.4M vs. 7M steps).
  • Throughput and Memory Efficiency: At ultra-high resolutions (2048px), LiT's linear attention runs nearly 9× faster than standard self-attention and slashes GPU memory consumption from ~14GB to just 4GB, preventing Out-Of-Memory (OOM) errors.
Comparison of module latency and GPU memory usage across resolutions
  • Text-to-Image Performance: Converted from PixArt-$\Sigma$, LiT-0.6B maintained comparable GenEval scores while reducing generation latency by roughly 10% at 1K resolution and 55% at 2K resolution.
  • On-Device Deployment: Demonstrating its edge-computing readiness, the authors successfully deployed LiT-0.6B offline on a standard Windows 11 laptop, enabling local 1K resolution image synthesis directly from text prompts.

Limitations and Future Work

While LiT bridges the performance gap for resolutions up to 2K, the authors note that scaling to even higher resolutions (such as 4K) and larger model capacities remains an open frontier. Additionally, while weight inheritance drastically reduces training time, LiT still requires a brief adaptation/distillation phase rather than acting as a true zero-shot drop-in replacement for existing DiT models.

Summary updated

BibTeX
@inproceedings{wang2025lit,
  author = {Jiahao Wang and Ning Kang and Lewei Yao and Mengzhao Chen and Chengyue Wu and Songyang Zhang and Shuchen Xue and Yong Liu and Taiqiang Wu and Xihui Liu and Kaipeng Zhang and Shifeng Zhang and Wenqi Shao and Zhenguo Li and Ping Luo},
  title = {{LiT: Delving into a Simple Linear Diffusion Transformer for Image Generation}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2025},
}
Figure