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

若你能缓存我:通过块缓存加速扩散模型

Cache Me if You Can: Accelerating Diffusion Models through Block Caching

Meta GenAI(Meta生成式人工智能);Technical University of Munich(慕尼黑工业大学);MCML(慕尼黑机器学习中心);University of Oxford(牛津大学)
Felix Wimbauer, Bichen Wu, Edgar Schoenfeld, Xiaoliang Dai, Ji Hou, Zijian He, Artsiom Sanakoyeu, Peizhao Zhang, Sam Tsai, Jonas Kohler, Christian Rupprecht, Da… 展开作者

Felix Wimbauer, Bichen Wu, Edgar Schoenfeld, Xiaoliang Dai, Ji Hou, Zijian He, Artsiom Sanakoyeu, Peizhao Zhang, Sam Tsai, Jonas Kohler, Christian Rupprecht, Daniel Cremers, Peter Vajda, Jialiang Wang

AI总结:

本文提出块缓存方法,通过重用扩散模型去噪网络中前序步骤的层块输出并自动确定缓存调度,在相同计算成本下提升图像生成质量。

摘要:

扩散模型因其生成逼真图像的能力,近年来彻底改变了图像合成领域。然而,扩散模型的一个主要缺点是图像生成过程成本高昂。一个大型的图像到图像网络必须被多次应用,以从随机噪声中迭代地细化图像。虽然许多近期工作提出了减少所需步骤数量的技术,但它们通常将底层去噪网络视为黑盒。在本工作中,我们研究了网络内部各层的行为,并发现:1)各层的输出随时间平滑变化;2)各层表现出不同的变化模式;3)从一步到下一步的变化通常非常小。我们假设去噪网络中的许多层计算是冗余的。利用这一点,我们引入了块缓存方法,在该方法中,我们重用前一步骤中层块的输出以加速推理。此外,我们提出了一种根据每个块随时间步的变化自动确定缓存调度的技术。在我们的实验中,我们通过FID、人类评估和定性分析表明,块缓存能够在相同的计算成本下生成具有更高视觉质量的图像。我们在不同的最先进模型(LDM和EMU)和求解器(DDIM和DPM)上证明了这一点。

英文摘要:

Diffusion models have recently revolutionized the field of image synthesis due to their ability to generate photorealistic images. However, one of the major drawbacks of diffusion models is that the image generation process is costly. A large image-to-image network has to be applied many times to iteratively refine an image from random noise. While many recent works propose techniques to reduce the number of required steps, they generally treat the underlying denoising network as a black box. In this work, we investigate the behavior of the layers within the network and find that 1) the layers' output changes smoothly over time, 2) the layers show distinct patterns of change, and 3) the change from step to step is often very small. We hypothesize that many layer computations in the denoising network are redundant. Leveraging this, we introduce block caching, in which we reuse outputs from layer blocks of previous steps to speed up inference. Furthermore, we propose a technique to automatically determine caching schedules based on each block's changes over timesteps. In our experiments, we show through FID, human evaluation and qualitative analysis that Block Caching allows to generate images with higher visual quality at the same computational cost. We demonstrate this for different state-of-the-art models (LDM and EMU) and solvers (DDIM and DPM).

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

↑