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

用于文本到图像合成中无需训练语义绑定的Token合并

Token Merging for Training-Free Semantic Binding in Text-to-Image Synthesis

Nankai University(南开大学);Computer Vision Center(计算机视觉中心);Universitat Autònoma de Barcelona(巴塞罗那自治大学);University of Chinese Academy of Sciences(中国科学院大学);Mohamed bin Zayed University of AI(穆罕默德·本·扎耶德人工智能大学);Linkoping University(林雪平大学);NKIARI(深圳市人工智能与机器人研究院)

Taihang Hu, Linxuan Li, Joost van de Weijer, Hongcheng Gao, Fahad Shahbaz Khan, Jian Yang, Ming-Ming Cheng, Kai Wang, Yaxing Wang

AI总结:

本文提出一种名为Token Merging(ToMe)的无训练方法,通过将相关token聚合为复合token以共享交叉注意力图,并辅以端token替换及两种辅助损失,有效解决了T2I模型中复杂场景下的语义绑定问题。

摘要:

尽管文本到图像(T2I)模型展现出卓越的生成能力,但它们经常无法准确绑定输入提示词中语义相关的对象或属性;这一挑战被称为语义绑定。先前的方法要么涉及对整个T2I模型进行密集的微调,要么要求用户或大型语言模型指定生成布局,增加了复杂性。在本文中,我们将语义绑定定义为将给定对象与其属性关联起来(称为属性绑定),或将其与其他相关子对象链接起来(称为对象绑定)的任务。我们引入了一种名为Token Merging(ToMe)的新方法,该方法通过将相关token聚合为单个复合token来增强语义绑定。这确保了对象、其属性和子对象都共享相同的交叉注意力图。此外,为了解决复杂文本提示中主要对象之间潜在的混淆,我们提出了端token替换作为补充策略。为了在确定布局的T2I生成初始阶段进一步完善我们的方法,我们引入了两个辅助损失,即熵损失和语义绑定损失,以迭代更新复合token,从而提高生成完整性。我们进行了广泛的实验来验证ToMe的有效性,并在T2I-CompBench和我们提出的GPT-4o对象绑定基准上将其与各种现有方法进行了比较。我们的方法在涉及多个对象和属性的复杂场景中尤为有效,而这些场景是先前方法经常无法解决的。代码将在\url{https://github.com/hutaihang/ToMe}上公开提供。

英文摘要:

Although text-to-image (T2I) models exhibit remarkable generation capabilities, they frequently fail to accurately bind semantically related objects or attributes in the input prompts; a challenge termed semantic binding. Previous approaches either involve intensive fine-tuning of the entire T2I model or require users or large language models to specify generation layouts, adding complexity. In this paper, we define semantic binding as the task of associating a given object with its attribute, termed attribute binding, or linking it to other related sub-objects, referred to as object binding. We introduce a novel method called Token Merging (ToMe), which enhances semantic binding by aggregating relevant tokens into a single composite token. This ensures that the object, its attributes and sub-objects all share the same cross-attention map. Additionally, to address potential confusion among main objects with complex textual prompts, we propose end token substitution as a complementary strategy. To further refine our approach in the initial stages of T2I generation, where layouts are determined, we incorporate two auxiliary losses, an entropy loss and a semantic binding loss, to iteratively update the composite token to improve the generation integrity. We conducted extensive experiments to validate the effectiveness of ToMe, comparing it against various existing methods on the T2I-CompBench and our proposed GPT-4o object binding benchmark. Our method is particularly effective in complex scenarios that involve multiple objects and attributes, which previous methods often fail to address. The code will be publicly available at \url{https://github.com/hutaihang/ToMe}.

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

↑