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

快速稳定扩散的令牌合并

Token Merging for Fast Stable Diffusion

Georgia Tech(佐治亚理工学院)

Daniel Bolya, Judy Hoffman

摘要:

开放词汇扩散模型永远地改变了图像生成的前景。然而,这些模型的核心是使用Transformers,这使得发电速度很慢。已经出现了更好的实现来增加这些Transformers的吞吐量,但它们仍然评估整个模型。在本文中,我们反而加快扩散模型,利用自然冗余生成的图像合并冗余令牌。在对令牌合并(ToMe)进行了一些特定于扩散的改进之后,我们的ToMe for Stable Diffusion可以将现有稳定扩散模型中的令牌数量减少多达60%,同时仍然可以生成高质量的图像,而无需任何额外的训练。在此过程中,我们将图像生成速度提高了2倍,并将内存消耗减少了5.6倍。此外,这通过xFormers等高效实现加快了堆栈速度,对质量的影响最小,同时对于大型图像的速度提高了5.4倍。代码可在https://github.com/dbolya/tomesd上获得。

英文摘要:

The landscape of image generation has been forever changed by open vocabulary diffusion models. However, at their core these models use transformers, which makes generation slow. Better implementations to increase the throughput of these transformers have emerged, but they still evaluate the entire model. In this paper, we instead speed up diffusion models by exploiting natural redundancy in generated images by merging redundant tokens. After making some diffusion-specific improvements to Token Merging (ToMe), our ToMe for Stable Diffusion can reduce the number of tokens in an existing Stable Diffusion model by up to 60% while still producing high quality images without any extra training. In the process, we speed up image generation by up to 2x and reduce memory consumption by up to 5.6x. Furthermore, this speed-up stacks with efficient implementations such as xFormers, minimally impacting quality while being up to 5.4x faster for large images. Code is available at https://github.com/dbolya/tomesd.

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

↑