arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.01125cs.CV
收藏

$Δ$-DiT:一种专为扩散Transformer定制的免训练加速方法

$Δ$-DiT: A Training-Free Acceleration Method Tailored for Diffusion Transformers

Fudan University(复旦大学);Imperial College London(帝国理工学院)

Pengtao Chen, Mingzhu Shen, Peng Ye, Jianjian Cao, Chongjun Tu, Christos-Savvas Bouganis, Yiren Zhao, Tao Chen

AI总结:

针对扩散Transformer(DiT)缺乏专用加速框架的问题,基于DiT前部块生成轮廓、后部块生成细节的发现,提出免训练推理加速框架$Δ$-DiT及$Δ$-Cache缓存机制,在早期和后期采样阶段分别加速后部和前部DiT块,实现了显著加速且多数情况下提升性能。

摘要:

扩散模型因能生成高质量和多样化的图像而被广泛认可,但其较差的实时性能催生了大量加速研究,这些研究主要聚焦于基于UNet的结构。随着扩散Transformer(DiT)取得更成功的成果,目前仍缺乏关于DiT结构对生成影响的探索,也缺少专门针对DiT架构定制的加速框架。为应对这些挑战,我们研究了DiT块与图像生成之间的相关性。研究结果表明,DiT的前部块与生成图像的轮廓相关,而后部块则与细节相关。基于这一发现,我们提出了一种整体的免训练推理加速框架$Δ$-DiT:使用设计的缓存机制在早期采样阶段加速后部DiT块,在后期阶段加速前部DiT块。具体而言,提出了一种名为$Δ$-Cache的DiT专用缓存机制,该机制考虑了先前采样图像的输入并减少了推理中的偏差。在PIXART-$α$和DiT-XL上的大量实验表明,$Δ$-DiT能在20步生成中实现$1.6\ imes$的加速,并在大多数情况下甚至提升了性能。在4步一致性模型生成以及更具挑战性的$1.12\ imes$加速场景下,我们的方法显著优于现有方法。我们的代码将公开发布。

英文摘要:

Diffusion models are widely recognized for generating high-quality and diverse images, but their poor real-time performance has led to numerous acceleration works, primarily focusing on UNet-based structures. With the more successful results achieved by diffusion transformers (DiT), there is still a lack of exploration regarding the impact of DiT structure on generation, as well as the absence of an acceleration framework tailored to the DiT architecture. To tackle these challenges, we conduct an investigation into the correlation between DiT blocks and image generation. Our findings reveal that the front blocks of DiT are associated with the outline of the generated images, while the rear blocks are linked to the details. Based on this insight, we propose an overall training-free inference acceleration framework $Δ$-DiT: using a designed cache mechanism to accelerate the rear DiT blocks in the early sampling stages and the front DiT blocks in the later stages. Specifically, a DiT-specific cache mechanism called $Δ$-Cache is proposed, which considers the inputs of the previous sampling image and reduces the bias in the inference. Extensive experiments on PIXART-$α$ and DiT-XL demonstrate that the $Δ$-DiT can achieve a $1.6\times$ speedup on the 20-step generation and even improves performance in most cases. In the scenario of 4-step consistent model generation and the more challenging $1.12\times$ acceleration, our method significantly outperforms existing methods. Our code will be publicly available.

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

↑