DiTFastAttnV2: Head-wise Attention Compression for Multi-Modality Diffusion Transformers
Hanling Zhang, Rundong Su, Zhihang Yuan, Pengtao Chen, Mingzhu Shen Yibo Fan, Shengen Yan, Guohao Dai, Yu Wang
TL;DR
This work tackles the computational bottleneck of attention in Multimodal Diffusion Transformers (MMDiT) by introducing DiTFastAttnV2, a post-training compression framework built on head-wise arrow attention, head-wise caching, and a dedicated fused kernel. A lightweight calibration metric and progressive, per-head plan optimization enable compression plan search in minutes rather than hours, delivering up to $68\%$ reduction in attention FLOPs and up to $1.5\times$ end-to-end speedup on $2K$ image generation while preserving perceptual quality. Experiments on Stable Diffusion 3 and FLUX validate strong sparsity-Quality trade-offs, showing robust generation with reduced computation. The approach offers a practical pathway to scalable, efficient multi-modal diffusion systems by tailoring attention compression to per-head dynamics and leveraging efficient kernel implementations.
Abstract
Text-to-image generation models, especially Multimodal Diffusion Transformers (MMDiT), have shown remarkable progress in generating high-quality images. However, these models often face significant computational bottlenecks, particularly in attention mechanisms, which hinder their scalability and efficiency. In this paper, we introduce DiTFastAttnV2, a post-training compression method designed to accelerate attention in MMDiT. Through an in-depth analysis of MMDiT's attention patterns, we identify key differences from prior DiT-based methods and propose head-wise arrow attention and caching mechanisms to dynamically adjust attention heads, effectively bridging this gap. We also design an Efficient Fused Kernel for further acceleration. By leveraging local metric methods and optimization techniques, our approach significantly reduces the search time for optimal compression schemes to just minutes while maintaining generation quality. Furthermore, with the customized kernel, DiTFastAttnV2 achieves a 68% reduction in attention FLOPs and 1.5x end-to-end speedup on 2K image generation without compromising visual fidelity.
