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

Shuo Yang, Haocheng Xi, Yilong Zhao, Muyang Li, Jintao Zhang, Han Cai, Yujun Lin, Xiuyu Li, Chenfeng Xu, Kelly Peng, Jianfei Chen, Song Han, Kurt Keutzer, Ion Stoica

arXiv:2505.18875 · 2026-07-27 공개 · arXiv · PDF

video-generation training-free diffusion-transformers sparse-attention psnr hunyuanvideo k-means-clustering semantic-aware-permutation

Abstract

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}.

한국어 요약

한 줄 요약

SVG2는 의미 기반 토큰 재배열을 통해 영상 생성 속도를 2.30× 가속화하면서도 PSNR 30을 유지하는 훈련 없이 사용할 수 있는 스파스 어텐션 프레임워크이다.

핵심 기여도

핵심 아이디어

기존 스파스 어텐션 방법은 토큰을 위치 기반으로 클러스터링하여 의미적 유사성을 무시함으로써, 정확한 중요 토큰 식별이 어려웠다. 또한, 중요 토큰이 비중요 토큰 사이에 흩어져 있어 GPU 연산 효율성이 저하되었다. SVG2는 **의미 기반 퍼뮤테이션**을 통해 토큰을 의미적 유사도에 따라 클러스터링하고, **k-means 클러스터링**을 사용해 토큰을 재배열함으로써 두 문제를 동시에 해결한다. 이는 **Query, Key, Value 벡터**에 대해 수행되며, 클러스터 내 토큰이 의미적으로 유사해지도록 보장한다. 결과적으로, 중요 토큰 식별 정확도가 향상되고, 연산 낭비가 줄어든다.

기술적 접근법

주요 결과

의의 및 한계

SVG2는 영상 생성 모델에서 **3D 어텐션의 제곱 복잡도**를 줄이는 데 성공하며, **실제 GPU 하드웨어 특성**과 **의미적 유사도**를 모두 고려한 최적화를 제공한다. 특히, **훈련 없이 즉시 적용 가능한** 프레임워크라는 점에서 실용적 가치가 높다. 그러나, **DiT 이외의 어텐션 메커니즘**에의 확장 가능성에 대한 평가가 부재하며, 이는 향후 연구 주제로 제시된다. 또한, **비중요 토큰의 영향**이 미미한 경우에만 효과적일 수 있다는 한계도 존재한다.

실용적 활용

SVG2는 **대규모 영상 생성 모델**(예: HunyuanVideo, Wan 2.1)의 **실시간 또는 저비용 배포**에 적합하며, **AIGC**(인공지능 생성 콘텐츠) 산업에서 **GPU 자원 최적화**를 필요로 하는 상황에 유용하게 활용될 수 있다. 특히, **클라우드 기반 생성 서비스**나 **모바일 환경**에서 연산 효율성이 중요한 경우에 적용 가능하다.