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

Z-Cache:通过自反射加速扩散Transformer

Z-Cache: Accelerating Diffusion Transformers via Self-Reflection

Shanghai Jiao Tong University(上海交通大学);Southern University of Science and Technology(南方科技大学);Alibaba Cloud(阿里云);Huazhong University of Science and Technology(华中科技大学)

Zegang Cheng, Zhikai Wang, Jiacheng Liu, Xiaobing Tu, Chang Zou, Junjie Chen, Yue Ma, Zhiyuan Ma, Jinkui Ren, Likai Zou, Linfeng Zhang

AI总结:

本文提出Z-Cache特征缓存方法,通过自反射修正特征误差,在维持扩散Transformer生成质量的同时,将FLUX-dev文本到图像生成的推理速度提升6.22倍。

摘要:

扩散Transformer已成为视觉生成领域最强大的模型,但仍存在计算成本过高的问题。为解决该问题,特征缓存技术被提出,用于缓存扩散模型在先前计算步骤中的特征并在后续缓存步骤中复用,虽能显著加速推理,但会导致生成质量下降。针对此问题,本文提出Z-Cache,一种可通过自反射维持高质量生成的特征缓存方法。具体而言,研究发现特征缓存带来的误差在每次完整计算后会大幅降低,基于该观察,Z-Cache的设计逻辑为:先预测后续缓存步骤的特征,再执行一次完整计算;之后返回缓存步骤,结合先前与当前计算步骤重新预测特征,实现特征修正。实验表明,采用Z-Cache后,扩散Transformer的生成质量与原模型相当,但推理速度更快,例如在FLUX-dev文本到图像生成任务上实现了6.22倍加速,代码已在GitHub上发布。

英文摘要:

Diffusion transformers have become the most powerful models for visual generation, but still suffer from massive computation costs. To solve this problem, feature caching has been proposed to cache the features of diffusion models in the previous computation steps and then reuse them in the following caching steps, which brings significant acceleration but also degradation in generation quality. To address this problem, this paper proposes Z-cache as a feature caching method that can maintain high-quality generation through self-reflection. Concretely, we observe that the error from feature caching tends to be sharply reduced after each full computation. Based on this observation, Z-Cache is designed to first predict the features in the future caching steps and then perform a full computation. After that, Z-Cache returns to the caching steps and re-predicts them based on the previous and the current computation steps, which brings correction in features. Experiments demonstrate that with Z-Cache, diffusion transformers achieve comparable generation quality to the original model but with faster inference speed, for instance, 6.22X acceleration on FLUX-dev for text-to-image generation. Our code is released on GitHub.

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

↑