AttnRouter:基于MMDiT的无训练图像编辑的类别级注意力路由
AttnRouter: Per-Category Attention Routing for Training-Free Image Editing on MMDiT
AI总结:
本文提出AttnRouter,通过类别级路由表优化MMDiT的无训练图像编辑,实验显示其在CLIP-T+DINO-I复合指标上提升6.4%,且自动分类器在仅55%类别准确率下关闭98%的差距。
摘要:
我们研究了Qwen-Image-Edit-2511上的无训练图像编辑,这是一个60层多模态扩散变换器(MMDiT),在单一注意力流中将噪声和源图像标记拼接。我们有三个贡献:(i)引入KVInject,一种单次前向注意力操作,将源半部分的键/值投影以alpha混合的方式注入到噪声半部分中,该方法比经典两步MasaCtrl配方更简单,并避免了在MMDiT上禁用MasaCtrl的提示不匹配失败模式(复合得分下降31% vs 基线)。(ii)我们表明没有单一的注意力操作在所有编辑类型中占主导地位,这促使了AttnRouter,一个按类别路由的表格,将编辑分配到最适合保持源结构的操作。在真实类别下,路由将CLIP-T+DINO-I复合指标提高了6.4%超过编辑基线;自动CLIP零样本分类器在仅55%类别准确率下关闭了98%的差距。 (iii)通过层、步和alpha带的消融实验,我们本地化了编辑有效的注意力子电路:在早期去噪步骤(S0-7)中的K/V注入恢复了完整步骤注入的几乎全部增益,而早期(L0-15)或晚期(L45-60)层带的注入无法驱动编辑;alpha在[0.3, 0.5]范围内是一个稳定的甜点。我们还报告了负面结果,突显了从UNet传统中无法转移的内容:简单的K/V缩放从未超过基线,而激进的变体完全崩溃生成(复合0.084)。我们发布了代码、预计算的路由表以及用于所有消融实验的ImgEdit-Bench的100样本分层子集。
英文摘要:
We study training-free image editing on Qwen-Image-Edit-2511, a 60-block multi-modal diffusion transformer (MMDiT) that concatenates noise and source-image tokens within a single attention stream. We make three contributions. (i) We introduce KVInject, a single-forward attention manipulation that alpha-blends source-half key/value projections into the noise-half within a localized layer/step band. KVInject is simpler than the classical two-pass MasaCtrl recipe and avoids the prompt-mismatch failure mode that disables MasaCtrl on MMDiT (composite score drops 31% versus baseline). (ii) We show that no single attention operation dominates across edit types, motivating AttnRouter, a per-category routing table that dispatches edits to the operation that best preserves source structure for that type. With ground-truth categories the router improves the CLIP-T+DINO-I composite by 6.4% over the editing baseline; an automatic CLIP zero-shot classifier closes 98% of this gap despite only 55% category accuracy. (iii) Through layer-, step-, and alpha-band ablations we localize the editing-effective attention sub-circuit: K/V injection in early denoising steps (S0-7) recovers nearly all of the gain of full-step injection, while injection in early (L0-15) or late (L45-60) layer bands fails to drive editing entirely; alpha in [0.3, 0.5] is a stable sweet spot. We also report negative results that highlight what does not transfer from the UNet folklore: simple K/V rescaling never beats baseline and aggressive variants collapse generation entirely (composite 0.084). We release code, pre-computed routing tables, and a 100-sample stratified subset of ImgEdit-Bench used in all ablations.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。