arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2501.00375cs.CVcs.LG

面向更优缓存的令牌剪枝:Stable Diffusion 免费实现 9 倍加速

Token Pruning for Caching Better: 9 Times Acceleration on Stable Diffusion for Free

Shanghai Jiao Tong University(上海交通大学);China University of Mining and Technology(中国矿业大学);University of Electronic Science and Technology of China(电子科技大学);Tsinghua University(清华大学);The Hong Kong University of Science and Technology (Guangzhou)(香港科技大学(广州))

Evelyn Zhang, Bang Xiao, Jiayi Tang, Qianli Ma, Chang Zou, Xuefei Ning, Xuming Hu, Linfeng Zhang

AI总结:

本文提出动态感知令牌剪枝方法 DaTo,通过剪枝低动态令牌并与特征缓存结合,在无需训练的情况下实现 Stable Diffusion 最高 9 倍加速并提升图像质量。

摘要:

Stable Diffusion 在文本到图像生成领域取得了显著成功,其强大的生成能力和多样化的生成结果产生了深远影响。然而,其迭代去噪过程带来了高昂的计算成本并减慢了生成速度,限制了更广泛的应用。社区为降低这一计算负担做出了大量努力,其中特征缓存等方法因其有效性和简洁性而受到关注。尽管如此,简单地重用先前时间步计算的特征会导致相邻时间步之间的特征变得相似,降低特征随时间的动态性,最终损害生成图像的质量。在本文中,我们提出了一种动态感知的令牌剪枝(DaTo)方法,以解决特征缓存的局限性。DaTo 选择性地剪枝动态性较低的令牌,仅允许高动态令牌参与自注意力层,从而在时间步之间扩展特征动态性。DaTo 以无需训练的方式将特征缓存与令牌剪枝相结合,同时实现了时间维度和令牌维度的信息重用。将我们的方法应用于 ImageNet 上的 Stable Diffusion 时,实现了 9 倍加速,同时将 FID 降低了 0.33,表明图像质量得到提升。在 COCO-30k 上,我们观察到 7 倍加速,同时 FID 显著降低了 2.17。

英文摘要:

Stable Diffusion has achieved remarkable success in the field of text-to-image generation, with its powerful generative capabilities and diverse generation results making a lasting impact. However, its iterative denoising introduces high computational costs and slows generation speed, limiting broader adoption. The community has made numerous efforts to reduce this computational burden, with methods like feature caching attracting attention due to their effectiveness and simplicity. Nonetheless, simply reusing features computed at previous timesteps causes the features across adjacent timesteps to become similar, reducing the dynamics of features over time and ultimately compromising the quality of generated images. In this paper, we introduce a dynamics-aware token pruning (DaTo) approach that addresses the limitations of feature caching. DaTo selectively prunes tokens with lower dynamics, allowing only high-dynamic tokens to participate in self-attention layers, thereby extending feature dynamics across timesteps. DaTo combines feature caching with token pruning in a training-free manner, achieving both temporal and token-wise information reuse. Applied to Stable Diffusion on the ImageNet, our approach delivered a 9$\times$ speedup while reducing FID by 0.33, indicating enhanced image quality. On the COCO-30k, we observed a 7$\times$ acceleration coupled with a notable FID reduction of 2.17.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑