Sparse-vDiT: スパースアテンションの力を解き放ち、ビデオ拡散トランスフォーマーを高速化する
Sparse-vDiT: Unleashing the Power of Sparse Attention to Accelerate Video Diffusion Transformers
June 3, 2025
著者: Pengtao Chen, Xianfang Zeng, Maosen Zhao, Peng Ye, Mingzhu Shen, Wei Cheng, Gang Yu, Tao Chen
cs.AI
要旨
拡散トランスフォーマー(DiTs)はビデオ生成においてブレークスルーを達成しているものの、この長いシーケンス生成タスクは依然として注意機構の二次的な複雑さに制約されており、推論の遅延が顕著です。ビデオ拡散トランスフォーマー(vDiT)における注意マップの詳細な分析を通じて、我々は3つの繰り返し現れるスパースパターンを特定しました:対角線、多重対角線、および垂直ストライプ構造です。さらに、3-6\%の注意ヘッドをスキップすることも可能です。重要なことに、これらのパターンは層の深さとヘッドの位置に強い相関を示しますが、入力内容への依存性は限定的です。これらの知見を活用して、我々はSparse-vDiTを提案します。これはvDiTのためのスパース加速フレームワークであり、以下の要素を含みます:1)各特定されたスパースパターンに対して、密な注意を計算効率の高い実装に置き換えるパターン最適化スパースカーネル。2)ハードウェアを意識したコストモデリングを通じて、層ごとおよびヘッドごとに最適なスパース計算戦略を選択するオフラインスパース拡散探索アルゴリズム。最適な構成を決定した後、同じ層内で同じ注意戦略を共有するヘッドを融合し、推論効率を向上させます。最先端のvDiTモデル(CogVideoX1.5、HunyuanVideo、およびWan2.1)に統合されたSparse-vDiTは、それぞれ2.09倍、2.38倍、1.67倍の理論的なFLOP削減を達成し、実際の推論速度は1.76倍、1.85倍、1.58倍向上しました。これらは高い視覚的忠実度を維持し、PSNR値は24.13、27.09、22.59に達しました。我々の研究は、vDiTにおける潜在的な構造的スパース性を体系的に活用して長いビデオ合成を行うことができることを示しています。
English
While Diffusion Transformers (DiTs) have achieved breakthroughs in video
generation, this long sequence generation task remains constrained by the
quadratic complexity of attention mechanisms, resulting in significant
inference latency. Through detailed analysis of attention maps in Video
Diffusion Transformer (vDiT), we identify three recurring sparsity patterns:
diagonal, multi-diagonal, and vertical-stripe structures. And even 3-6\%
attention heads can be skipped. Crucially, these patterns exhibit strong
layer-depth and head-position correlations but show limited dependence on the
input content. Leveraging these findings, we propose Sparse-vDiT, a sparsity
acceleration framework for vDiT comprising: 1) Pattern-optimized sparse kernels
that replace dense attention with computationally efficient implementations for
each identified sparsity pattern. 2) An offline sparse diffusion search
algorithm that selects the optimal sparse computation strategy per layer and
head via hardware-aware cost modeling. After determining the optimal
configuration, we fuse heads within the same layer that share the same
attention strategy, enhancing inference efficiency. Integrated into
state-of-the-art vDiT models (CogVideoX1.5, HunyuanVideo, and Wan2.1),
Sparse-vDiT achieves 2.09times, 2.38times, and 1.67times theoretical
FLOP reduction, and actual inference speedups of 1.76times, 1.85times,
and 1.58times, respectively, while maintaining high visual fidelity, with
PSNR values reaching 24.13, 27.09, and 22.59. Our work demonstrates that latent
structural sparsity in vDiTs can be systematically exploited for long video
synthesis.