arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2405.18428cs.CVcs.AI
收藏

DiG:基于门控线性注意力的可扩展高效扩散模型

DiG: Scalable and Efficient Diffusion Models with Gated Linear Attention

Huazhong University of Science & Technology(华中科技大学);ByteDance(字节跳动)

Lianghui Zhu, Zilong Huang, Bencheng Liao, Jun Hao Liew, Hanshu Yan, Jiashi Feng, Xinggang Wang

AI总结:

针对DiT模型处理长序列时的二次复杂度问题,本文提出DiG模型,将GLA的次二次建模能力融入二维扩散主干,在多分辨率下性能优于DiT等模型,且效率显著提升,还提供两种架构变体。

摘要:

大规模预训练的扩散模型在视觉内容生成领域取得了显著成功,其中扩散Transformer(DiT)就是典型例子。然而,DiT模型面临二次复杂度效率的挑战,尤其是在处理长序列时。本文旨在将门控线性注意力(GLA)的次二次建模能力融入二维扩散主干网络。具体而言,我们提出了扩散门控线性注意力Transformer(DiG),这是一种简单、易采用且参数开销极小的解决方案。我们提供了两种变体,即普通架构和U形架构,它们展现出更优的效率和具有竞争力的效果。除了在256×256分辨率下性能优于DiT和其他次二次时间扩散模型外,DiG从512分辨率开始就比这些方法更高效。具体来说,在1792分辨率下,DiG-S/2比DiT-S/2快2.5倍,节省75.7%的GPU内存;在1024分辨率下,DiG-XL/2比基于Mamba的模型快4.2倍;在2048分辨率下,比采用FlashAttention-2的DiT快1.8倍。我们将很快发布代码,代码地址为https://github.com/hustvl/DiG。

英文摘要:

Diffusion models with large-scale pre-training have achieved significant success in the field of visual content generation, particularly exemplified by Diffusion Transformers (DiT). However, DiT models have faced challenges with quadratic complexity efficiency, especially when handling long sequences. In this paper, we aim to incorporate the sub-quadratic modeling capability of Gated Linear Attention (GLA) into the 2D diffusion backbone. Specifically, we introduce Diffusion Gated Linear Attention Transformers (DiG), a simple, adoptable solution with minimal parameter overhead. We offer two variants, i,e, a plain and U-shape architecture, showing superior efficiency and competitive effectiveness. In addition to superior performance to DiT and other sub-quadratic-time diffusion models at $256 \times 256$ resolution, DiG demonstrates greater efficiency than these methods starting from a $512$ resolution. Specifically, DiG-S/2 is $2.5\times$ faster and saves $75.7\%$ GPU memory compared to DiT-S/2 at a $1792$ resolution. Additionally, DiG-XL/2 is $4.2\times$ faster than the Mamba-based model at a $1024$ resolution and $1.8\times$ faster than DiT with FlashAttention-2 at a $2048$ resolution. We will release the code soon. Code is released at https://github.com/hustvl/DiG.

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

↑