[论文解读] Training-free Diffusion Model Adaptation for Variable-Sized Text-to-Image Synthesis
本文提出了一种无需训练的方法,通过引入一种新型缩放因子,实现文本到图像扩散模型在可变尺寸图像生成中的适应,该缩放因子可稳定不同分辨率下的注意力熵。通过分析标记数量与注意力熵之间的关系,该方法缓解了低分辨率下的对象表征不完整问题以及高分辨率下的重复、杂乱模式问题,显著提升了图像质量和文本对齐效果,且无需微调或重新训练。
Diffusion models (DMs) have recently gained attention with state-of-the-art performance in text-to-image synthesis. Abiding by the tradition in deep learning, DMs are trained and evaluated on the images with fixed sizes. However, users are demanding for various images with specific sizes and various aspect ratio. This paper focuses on adapting text-to-image diffusion models to handle such variety while maintaining visual fidelity. First we observe that, during the synthesis, lower resolution images suffer from incomplete object portrayal, while higher resolution images exhibit repetitively disordered presentation. Next, we establish a statistical relationship indicating that attention entropy changes with token quantity, suggesting that models aggregate spatial information in proportion to image resolution. The subsequent interpretation on our observations is that objects are incompletely depicted due to limited spatial information for low resolutions, while repetitively disorganized presentation arises from redundant spatial information for high resolutions. From this perspective, we propose a scaling factor to alleviate the change of attention entropy and mitigate the defective pattern observed. Extensive experimental results validate the efficacy of the proposed scaling factor, enabling models to achieve better visual effects, image quality, and text alignment. Notably, these improvements are achieved without additional training or fine-tuning techniques.
研究动机与目标
- 解决使用预训练扩散模型在多样化分辨率和长宽比下生成高保真图像的挑战。
- 克服固定尺寸训练的局限性,实现在低分辨率和高分辨率下的有效生成。
- 缓解两种不同的失败模式:低分辨率图像中对象表征不完整,以及高分辨率图像中重复、杂乱的对象生成。
- 提升文本提示与生成图像在可变分辨率下的语义对齐。
- 在不增加训练或微调的前提下实现上述改进,确保与现有开源模型的兼容性。
提出的方法
- 为注意力层提出一种缩放因子,根据分辨率调节特征的空间聚合。
- 建立标记数量(与分辨率相关)与注意力图熵之间的统计关系。
- 将低分辨率缺陷解释为由于注意力范围过窄导致的空间信息不足,将高分辨率缺陷解释为由于注意力范围过宽导致的空间聚合冗余。
- 设计缩放因子以稳定不同序列长度(标记数量)下的注意力熵,减少由分辨率引起的分布偏移。
- 仅在推理阶段应用该缩放因子,通过替换注意力机制中原有的缩放方式实现,无需模型重新训练。
- 在包括 224²、512² 和 768² 在内的多种分辨率和长宽比下,通过定性和定量分析验证该方法。
实验结果
研究问题
- RQ1在扩散模型中,注意力熵如何随图像分辨率变化?这对不同分辨率下的视觉质量有何含义?
- RQ2为何低分辨率图像会出现对象表征不完整,而高分辨率图像则表现出重复、杂乱的模式?
- RQ3能否通过一种与分辨率无关的缩放因子稳定注意力熵,并提升可变尺寸生成的视觉保真度?
- RQ4与上采样和超分辨率技术相比,该方法在语义丰富度和视觉连贯性方面表现如何?
- RQ5该无训练方法在不微调的前提下,能在多大程度上提升图像质量和文本对齐效果?
主要发现
- 所提出的缩放因子成功减少了不同分辨率下注意力熵的波动,稳定了模型的空间聚合行为。
- 在 224² 分辨率下,该方法提高了注意力熵,改善了对象完整性并减少了表征不足。
- 在 768² 分辨率下,该方法降低了注意力熵,缓解了重复和杂乱的对象生成。
- 该方法在所有测试分辨率(包括 224²、512² 和 768²)下均实现了更优的图像保真度和文本对齐得分。
- 定性结果表明,与上采样和超分辨率基线相比,生成图像具有更丰富的语义内容和更自然的图像结构。
- 该方法在低分辨率下保持了较低的时间和内存开销,支持在资源受限设备上高效推理。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。