arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2405.15330cs.CVcs.LG
收藏

理解文本到图像扩散模型的工作机制

Towards Understanding the Working Mechanism of Text-to-Image Diffusion Model

Huawei Noah’s Ark Lab(华为诺亚方舟实验室);Renmin University of China(中国人民大学);Nanjing University(南京大学)

Mingyang Yi, Aoxue Li, Yi Xin, Zhenguo Li

AI总结:

本文通过分析扩散去噪中间状态,揭示 T2I 模型早期由 EOS token 决定形状、后期自行补全细节的机制,并据此移除部分文本引导实现 25% 以上采样加速。

摘要:

近来,强大的潜空间扩散概率模型(DPM)已被应用于高质量文本到图像(T2I)生成(例如 Stable Diffusion),其方式是将编码后的目标文本提示注入逐步去噪的扩散图像生成器。尽管 DPM 在实践中取得了成功,但其背后的机制仍有待探索。为填补这一空白,我们首先考察 DPM 逐步去噪生成过程中的中间状态。实证观察表明,图像的形状在最初几个去噪步骤后即被重建,随后图像被填入细节(例如纹理)。产生该现象的原因是,在 DPM 添加噪声的前向过程(即生成的初始阶段)中,含噪图像的低频信号(与形状相关)直到最后阶段才被破坏。受这些观察启发,我们进一步探究文本提示中每个 token 在这两个阶段期间的影响。在以一组文本提示为条件进行了一系列 T2I 生成实验之后,我们得出结论:在较早的生成阶段,图像主要由文本提示中的特殊 token [\ exttt{EOS}] 决定,并且文本提示中的信息在该阶段已经得到传递。此后,扩散模型利用来自生成图像自身的信息补全其细节。最后,我们提出将这一观察应用于加速 T2I 生成过程,方法是适当地移除文本引导,最终将采样加速最高达 25% 以上。

英文摘要:

Recently, the strong latent Diffusion Probabilistic Model (DPM) has been applied to high-quality Text-to-Image (T2I) generation (e.g., Stable Diffusion), by injecting the encoded target text prompt into the gradually denoised diffusion image generator. Despite the success of DPM in practice, the mechanism behind it remains to be explored. To fill this blank, we begin by examining the intermediate statuses during the gradual denoising generation process in DPM. The empirical observations indicate, the shape of image is reconstructed after the first few denoising steps, and then the image is filled with details (e.g., texture). The phenomenon is because the low-frequency signal (shape relevant) of the noisy image is not corrupted until the final stage in the forward process (initial stage of generation) of adding noise in DPM. Inspired by the observations, we proceed to explore the influence of each token in the text prompt during the two stages. After a series of experiments of T2I generations conditioned on a set of text prompts. We conclude that in the earlier generation stage, the image is mostly decided by the special token [\texttt{EOS}] in the text prompt, and the information in the text prompt is already conveyed in this stage. After that, the diffusion model completes the details of generated images by information from themselves. Finally, we propose to apply this observation to accelerate the process of T2I generation by properly removing text guidance, which finally accelerates the sampling up to 25\%+.

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

↑