RegionRoute:基于扩散模型的区域风格迁移
RegionRoute: Regional Style Transfer with Diffusion Model
通过将风格 token 的注意力分数与物体掩码对齐,实现无需推理时掩码的局部风格迁移;其注意力监督思路(KL 聚焦损失 + BCE 覆盖损失)可迁移到任何需要空间约束的扩散编辑任务,如局部重绘、属性编辑与个性化生成。
原文依据 aligning the attention scores of style tokens with object masks during training
摘要译文
由模型翻译 · 术语统一 · 请对照原文核对关键结论在基于扩散模型的风格迁移中,精确的空间控制仍然具有挑战性。这一挑战源于扩散模型将风格视为全局特征,且缺乏风格表示的显式空间定位,因而难以将风格应用限制在特定物体或区域上。据我们所知,现有扩散模型无法执行真正的局部风格迁移,通常依赖手工制作的掩码或多阶段后处理,这会引入边界伪影并限制泛化能力。为解决这一问题,我们提出一种注意力监督的扩散框架,通过在训练过程中将风格 token 的注意力分数与物体掩码对齐,显式地教会模型在何处应用给定风格。两个互补的目标——基于 KL 散度的聚焦损失(Focus loss)与使用二元交叉熵的覆盖损失(Cover loss)——共同促进准确定位与稠密覆盖。模块化的 LoRA-MoE 设计进一步实现了高效且可扩展的多风格适配。为评估局部风格化,我们引入区域风格编辑分数(Regional Style Editing Score),它通过目标区域内基于 CLIP 的相似度衡量区域风格匹配度,并通过未编辑区域上的掩码感知相似度(LPIPS)与像素级一致性衡量身份保持度。实验表明,我们的方法在推理时实现了无需掩码的单物体风格迁移,产生区域准确且视觉连贯的结果,优于现有的基于扩散的编辑方法。
英文原文摘要 1490 字符
Precise spatial control in diffusion-based style transfer remains challenging. This challenge arises because diffusion models treat style as a global feature and lack explicit spatial grounding of style representations, making it difficult to restrict style application to specific objects or regions. To our knowledge, existing diffusion models are unable to perform true localized style transfer, typically relying on handcrafted masks or multi-stage post-processing that introduce boundary artifacts and limit generalization. To address this, we propose an attention-supervised diffusion framework that explicitly teaches the model where to apply a given style by aligning the attention scores of style tokens with object masks during training. Two complementary objectives, a Focus loss based on KL divergence and a Cover loss using binary cross-entropy, jointly encourage accurate localization and dense coverage. A modular LoRA-MoE design further enables efficient and scalable multi-style adaptation. To evaluate localized stylization, we introduce the Regional Style Editing Score, which measures Regional Style Matching through CLIP-based similarity within the target region and Identity Preservation via masked LPIPS and pixel-level consistency on unedited areas. Experiments show that our method achieves mask-free, single-object style transfer at inference, producing regionally accurate and visually coherent results that outperform existing diffusion-based editing approaches.