FreeCond:文本引导图像修复输入条件中的免费午餐
FreeCond: Free Lunch in the Input Conditions of Text-Guided Inpainting
AI总结:
针对 SDI 难以同时遵循提示词与掩码的问题,本文提出 FreeCond,通过调整潜在掩码值和图像条件频率对齐交叉注意力特征,无需额外计算即可显著提升多种 SDI 模型性能。
摘要:
在本研究中,我们旨在确定并解决 Stable Diffusion Inpainting(SDI)在同时遵循提示词和掩码指令方面的不足。由于掩码带来的训练偏差,当提示词指令与图像条件不相关时,修复质量会受到阻碍。因此,我们对 SDI 学到的内部表征进行了详细分析,重点关注掩码输入如何影响交叉注意力层。我们观察到,使文本关键 token 向输入掩码调整,可让模型在给定区域内选择性地绘制。利用这些洞见,我们提出了 FreeCond,它仅调整输入掩码条件和图像条件。通过提高潜在掩码值并修改图像条件的频率,我们使交叉注意力特征与模型的训练偏差保持一致,从而在无需额外计算的情况下提升生成质量,尤其是在用户输入复杂且偏离训练设置时。大量实验表明,FreeCond 可以增强任何基于 SDI 的模型,例如在 CLIP 分数上使 SDI 和 SDXLI 分别获得最高 60% 和 58% 的提升。
英文摘要:
In this study, we aim to determine and solve the deficiency of Stable Diffusion Inpainting (SDI) in following the instruction of both prompt and mask. Due to the training bias from masking, the inpainting quality is hindered when the prompt instruction and image condition are not related. Therefore, we conduct a detailed analysis of the internal representations learned by SDI, focusing on how the mask input influences the cross-attention layer. We observe that adapting text key tokens toward the input mask enables the model to selectively paint within the given area. Leveraging these insights, we propose FreeCond, which adjusts only the input mask condition and image condition. By increasing the latent mask value and modifying the frequency of image condition, we align the cross-attention features with the model's training bias to improve generation quality without additional computation, particularly when user inputs are complicated and deviate from the training setup. Extensive experiments demonstrate that FreeCond can enhance any SDI-based model, e.g., yielding up to a 60% and 58% improvement of SDI and SDXLI in the CLIP score.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。