Anchoring Instruction Outside Mask: Exact Reference Caching for Efficient In-Context Diffusion Transformers
作者: Yangshuai Liu, Zheming Li, Jiaao Li, Kang He, Ziliang Lai, Zhitai Liu, Chengru Song
分类: cs.CV
发布日期: 2026-08-21
💡 一句话要点
提出静态文本锚点以解决多参考图像生成效率问题
🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 多模态生成 扩散模型 教师蒸馏 图像编辑 效率提升 注意力机制 内容创作
📋 核心要点
- 现有方法在处理多个参考图像时计算量迅速增加,导致效率低下,且参考与目标标记之间的交互受到限制。
- 本文通过重新设计标记序列和注意力掩码,引入静态文本锚点,连接指令与参考分支,实现K和V的重用。
- 实验结果显示,所提方法在多个图像编辑基准上达到了全注意力生成的质量,并显著提高了处理速度。
📝 摘要(中文)
全模态生成在内容创作和编辑应用中至关重要,而上下文条件化是这一范式的核心。然而,现有方法在处理多个参考图像时计算量迅速增加,导致效率低下。本文提出了一种新的设计,通过静态文本锚点连接指令与参考分支,保持了K和V的重用而不增加参数,同时通过教师强制速度蒸馏恢复生成质量。实验表明,该方法在多个图像编辑基准上达到了全注意力生成的质量,并在处理五个参考图像时加速了40步去噪过程3.92倍。
🔬 方法详解
问题定义:本文旨在解决在多参考图像生成中计算量迅速增加的问题,现有方法通过结构化稀疏注意力限制了参考与目标标记之间的交互,导致生成质量下降。
核心思路:论文提出通过静态文本锚点连接指令与参考分支,保持K和V的重用而不增加参数,同时采用教师强制速度蒸馏来恢复生成质量。
技术框架:整体架构包括重新设计的标记序列和注意力掩码,主要模块包括静态文本锚点的引入和教师-学生蒸馏过程。
关键创新:首次在扩散模型中使用了基于策略的蒸馏方法来恢复架构性能,解决了传统方法中参考图像与文本指令之间的交互问题。
关键设计:设计中保持了K和V的重用,采用了教师强制速度蒸馏的损失函数,并在短期策略阶段中引入教师监督学生状态的机制。
🖼️ 关键图片
📊 实验亮点
实验结果表明,所提方法在处理五个参考图像时,40步去噪过程加速了3.92倍,且在十个参考图像时速度提升达到5.47倍,生成质量与全注意力模型相当,展示了显著的性能提升。
🎯 应用场景
该研究在内容创作、图像编辑和多模态生成等领域具有广泛的应用潜力。通过提高生成效率和质量,能够为艺术创作、广告设计等行业提供更高效的工具,推动相关技术的发展与应用。未来,该方法可能会影响更多基于视觉和文本的生成任务。
📄 摘要(原文)
Omnimodal generation is central to a wide range of content creation and editing applications. In-context conditioning is essential to this paradigm. It allows diffusion transformers to process text instructions and visual references in a shared attention sequence. However, each reference image introduces thousands of tokens. Computation therefore grows rapidly with the number of references. Existing methods reduce computation through structured sparse attention, which limits interactions between reference and target tokens. This structure also makes the reference K and V independent of the denoising target, allowing them to be computed once and reused across steps. However, it blocks visual references from attending to the text instruction. This substantially degrades instruction following and reference fidelity in multi-reference editing. To resolve this conflict, we jointly redesign the token sequence and attention mask. Our beyond-mask design uses static text anchors to connect the instruction to the reference branch. It preserves exact K and V reuse without adding parameters. However, this direct architectural conversion degrades generation quality. We recover the lost performance through teacher-forced velocity distillation, followed by a short on-policy stage in which the teacher supervises student-visited states. To our knowledge, this is the first use of on-policy distillation for architectural recovery in diffusion models. Across three image-editing benchmarks, our method matches full-attention generation quality. With five reference images, it accelerates the complete 40-step denoising process by 3.92x, while static text anchors introduce negligible runtime overhead; the speedup reaches 5.47x at ten references in our scaling study.