arXiv:2506.03275cs.CVcs.AI2025-06被引 8

不训练模型,通过动态稀疏重算加速扩散生成,提升推理速度。

Chipmunk: Training-Free Acceleration of Diffusion Transformers with Dynamic Column-Sparse Deltas

  • 基于注意力与MLP中激活值变化慢的特性,仅重算快速变化部分。
  • 在93%稀疏度下实现9.3倍加速,最大提速2.16倍且质量无损。
  • 适合作为通用加速器,可叠加现有缓存技术,适合部署优化场景。

扩散Transformer(DiT)在高质量图像与视频生成中表现卓越,但推理计算成本高。我们观察到,DiT潜变量噪声在推理步骤间变化缓慢,表明计算存在冗余。本文提出Chipmunk,在无需额外训练的前提下,利用推理时的动态稀疏性,仅重算变化最快的中间激活,其余结果缓存复用。研究发现,仅5%-25%的注意力与MLP值解释了70%-90%的激活变化。为此,Chipmunk采用体素重排引入列稀疏性,并设计高效稀疏收集内核,实现93%稀疏度下相比高度优化密集基线9.3倍加速。同时,通过重叠稀疏模式计算与缓存更新,隐藏额外延迟。实验显示,Chipmunk在HunyuanVideo上最高提速2.16倍,在FLUX.1-dev上达1.41倍,且生成质量无损。进一步叠加全步缓存后,于HunyuanVideo、WAN2.1、FLUX.1-dev分别达3.72×、2.67×、2.25×加速,质量影响极小。

原文摘要 · Abstract (English)

Diffusion Transformers (DiTs) have achieved state-of-the-art performance in high-quality image and video generation but incur substantial compute cost at inference. A common observation is that DiT latent noise vectors change slowly across inference steps, which suggests that the DiT compute may be redundant across steps. In this paper, we aim to speed up inference by reducing this redundancy, without additional training. We first study how activations change between steps in two state-of-the-art open-source DiTs. We find that just 5-25% of the values in attention and MLP explain 70-90% of the change in activations across steps. This finding motivates our approach, Chipmunk, which uses dynamic sparsity at inference time to recompute only the fastest-changing intermediate activations, while caching the rest. Dynamic sparsity introduces two systems challenges: (1) sparse attention and MLP operations tend to underutilize GPU tensor cores; and (2) computing dynamic sparsity patterns at runtime and caching activations both introduce overhead. To address these challenges, Chipmunk first uses a voxel-based reordering of input tokens to introduce column-wise sparsity. We implement column-sparse kernels utilizing efficient sparse gathers from global to shared GPU memory, achieving a 9.3x speedup at 93% sparsity compared to highly-optimized dense baselines. Second, Chipmunk overlaps the computation of sparsity patterns and cache updates with other parts of the computation (e.g., second layer of the MLP) to hide the extra latency. Chipmunk achieves up to 2.16x speedup on HunyuanVideo and 1.41x on FLUX.1-dev without compromising generation quality. Furthermore, we show that Chipmunk can be stacked on top of full step caching, achieving a 3.72x speedup on HunyuanVideo, a 2.67x speedup on WAN2.1, and a 2.25x speedup on FLUX.1-dev with minimal quality impact.

扩散模型推理加速动态稀疏GPU优化

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