Diffusion Transformer-to-Mamba Distillation for High-Resolution Image Generation

Yuan Yao, Yicong Hong, Difan Liu, Long Mai, Feng Liu, Jiebo Luo · DOI

Introduction

Diffusion Transformers (DiT) have become the state-of-the-art for high-quality image generation. However, their reliance on self-attention mechanisms introduces quadratic computational complexity, where doubling the pixel count quadruples the processing cost. This scaling bottleneck makes generating ultra-high-resolution images, such as 4K, prohibitively expensive.

High-fidelity 2048x2048 images generated by the T2MD model across various domains including space, maritime, wildlife, and fantasy.

To address this, researchers have explored State Space Models (SSMs) like Mamba, which offer linear complexity. While promising, Mamba models are traditionally difficult to train from scratch for vision tasks due to their inherent causal nature and convergence challenges. This paper introduces T2MD (Transformer-to-Mamba Distillation), a framework that transfers the generative capabilities of a pre-trained DiT into a highly efficient Mamba-based architecture.

Methodology: The T2MD Framework

The core of T2MD is a multi-stage distillation process designed to align the fundamentally different architectures of Transformers and Mamba models.

Hybrid Architecture

The student model utilizes a hybrid design consisting of 28 blocks. To maintain global dependencies, 4 blocks remain as Self-Attention "anchors," while the remaining 24 are replaced with efficient Mamba blocks. To process 2D image data effectively, the Mamba layers employ a bidirectional scanning strategy (width-first and height-first).

Layer-Level Teacher Forcing

Standard distillation often focuses only on final outputs. T2MD introduces "layer-level teacher forcing," where intermediate features from a frozen teacher model (PixArt-α) are injected directly into corresponding student layers. This technique prevents architectural discrepancies from compounding into errors, ensuring the Mamba student accurately mimics the teacher's internal representations.

The T2MD training pipeline, showing the distillation of intermediate features from a frozen T5/VAE/DiT teacher into a tunable Mamba student.

Training Stages

  1. Distillation: Training Mamba token mixers to replicate the teacher's attention layers at 512x512 resolution.
  2. Model Adaptation: Updating components like the VAE and Positional Encodings for high-resolution compatibility.
  3. High-Resolution Fine-Tuning: Progressively scaling the model's training from 512px to 1024px, and finally to 2048px.

Key Results

The T2MD approach yields significant improvements in both speed and quality:

  • Computational Efficiency: T2MD achieves a 2.1x speedup in sampling throughput over standard Transformers at 4K resolution (3840x2160) and a 1.5x speedup at 2K resolution.
  • Image Quality: The 0.7B parameter model achieved a Frechet Inception Distance (FID) of 8.63 on MS-COCO, outperforming larger established models like SDv1.5 (9.62).
  • Prompt Adherence: On the GenEval benchmark, T2MD significantly improved prompt-following scores compared to non-distilled Mamba baselines, nearly matching the performance of its much larger teacher model.
  • Resolution Milestone: This work represents the first successful application of an SSM-based model to generate high-fidelity 2048x2048 images with zero-shot 4K capabilities.

Conclusion and Future Work

T2MD demonstrates that distillation is a powerful tool for bypassing the "cold start" problem of training Mamba models for vision. By leveraging the knowledge of pre-trained Transformers, T2MD provides a path toward efficient, linear-time high-resolution image synthesis. Future research will focus on reducing the reliance on the remaining 14% of self-attention layers to move toward a "pure" Mamba architecture and addressing the inherent performance ceiling imposed by the teacher model.

Summary updated

BibTeX
@misc{yao2025diffusion,
  author = {Yuan Yao and Yicong Hong and Difan Liu and Long Mai and Feng Liu and Jiebo Luo},
  title = {{Diffusion Transformer-to-Mamba Distillation for High-Resolution Image Generation}},
  year = {2025},
  eprint = {2506.18999},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.18999},
}
Figure