arXiv:2505.18875cs.CV2025-05NeurIPS被引 96

通过语义聚类重排实现稀疏注意力,显著加速视频生成且不损失质量。

Sparse VideoGen2: Accelerate Video Generation with Sparse Attention via Semantic-Aware Permutation

  • 基于语义相似性聚类并重排视频帧,提升关键帧识别精度。
  • 在相同算力下,使视频生成速度提升最高2.30倍,保持高清晰度(PSNR达30)。
  • 无需训练,适合追求高效生成的视频模型开发者使用。

扩散变换器(DiTs)是视频生成的核心,但其注意力机制具有二次复杂度,导致延迟过高。稀疏注意力通过仅计算关键帧,可有效降低计算开销,是极具前景的加速方法。然而,现有方法在相同计算预算下难以兼顾生成质量:(1) 关键帧识别不准——当前方法按位置聚类,忽视语义差异,导致表征模糊;(2) 计算浪费严重——关键帧分散在非关键帧中,造成GPU无法高效处理连续数据。本文提出SVG2,一种无需训练的框架,在生成质量与效率间实现帕累托最优。核心为语义感知重排,利用k-means按语义相似性聚类并重新排序帧,既提升聚类表征精度,又使关键帧集中分布,便于高效计算且无需填充。此外,集成top-p动态预算控制与定制化核函数,实现最高2.30倍和1.89倍加速,同时在HunyuanVideo和Wan 2.1上分别保持高达30和26的PSNR。代码已开源。

原文摘要 · Abstract (English)

Diffusion Transformers (DiTs) are essential for video generation but suffer from significant latency due to the quadratic complexity of attention. By computing only critical tokens, sparse attention reduces computational costs and offers a promising acceleration approach. However, we identify that existing methods fail to approach optimal generation quality under the same computation budget for two reasons: (1) Inaccurate critical token identification: current methods cluster tokens based on position rather than semantics, leading to imprecise aggregated representations. (2) Excessive computation waste: critical tokens are scattered among non-critical ones, leading to wasted computation on GPUs, which are optimized for processing contiguous tokens. In this paper, we propose SVG2, a training-free framework that maximizes identification accuracy and minimizes computation waste, achieving a Pareto frontier trade-off between generation quality and efficiency. The core of SVG2 is semantic-aware permutation, which clusters and reorders tokens based on semantic similarity using k-means. This approach ensures both a precise cluster representation, improving identification accuracy, and a densified layout of critical tokens, enabling efficient computation without padding. Additionally, SVG2 integrates top-p dynamic budget control and customized kernel implementations, achieving up to 2.30x and 1.89x speedup while maintaining a PSNR of up to 30 and 26 on HunyuanVideo and Wan 2.1, respectively. Our code is open-sourced at \href{https://github.com/svg-project/Sparse-VideoGen}{https://github.com/svg-project/Sparse-VideoGen}.

视频生成稀疏注意力扩散模型加速

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。