arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.06228cs.CV

SAM-Flow:源锚定掩码流用于免训练图像编辑

SAM-Flow: Source-Anchored Masked Flow for Training-Free Image Editing

Tianjin Key Laboratory of Imaging and Sensing Microelectronic Technology, School of Microelectronics, Tianjin University(天津影像与传感微电子技术重点实验室,微电子学院,天津大学);School of Cyber Security, Tianjin University(网络安全学院,天津大学)

Haowang Cui, Rui Chen, Tao Luo, Tao Guo, Zheng Qin, Jiaze Wang

AI总结:

提出SAM-Flow框架,通过源锚定掩码流和动态软掩码机制实现局部免训练图像编辑,有效防止背景泄漏。

摘要:

免训练图像编辑最近因能够利用强大的预训练扩散和流匹配模型修改真实图像而无需额外训练,引起了越来越多的关注。然而,现有的基于反演和基于差分流的方法通常执行全局潜在传输,这不可避免地会将编辑效果传播到非目标区域并导致背景泄漏。为了解决这个问题,我们提出了SAM-Flow,一种源锚定掩码流框架,用于局部免训练图像编辑。SAM-Flow不是更新整个潜在表示,而是首先使用侦察图像和令牌接地注意力图来定位可编辑的语义区域。然后,它仅在这些区域内应用差分速度更新,同时将剩余区域锚定到源图像潜在轨迹。为了进一步提高空间稳定性和边界自然性,我们引入了一种时变源锚定投影机制,具有动态软掩码、过渡区域和时间掩码累积。所提出的方法是即插即用的,可以集成到主流流匹配骨干网络(如Stable Diffusion 3和FLUX)中,无需任何微调。大量的定性和定量实验表明,SAM-Flow实现了准确的语义编辑,同时显著改善了背景保持,为免训练图像编辑提供了一种简单且通用的局部编辑范式。代码可在 https://github.com/chwbob/Sam-Flow 获取。

英文摘要:

Training-free image editing has recently attracted increasing attention due to its ability to modify real images using powerful pre-trained diffusion and flow-matching models without additional training. However, existing inversion-based and differential-flow-based methods usually perform global latent transport, which inevitably propagates editing effects to non-target regions and leads to background leakage. To address this problem, we propose SAM-Flow, a source-anchored masked flow framework for localized training-free image editing. Instead of updating the whole latent representation, SAM-Flow first uses a scout image and token-grounded attention maps to localize the editable semantic regions. It then applies differential velocity updates only within these regions, while anchoring the remaining areas to the source-image latent trajectory. To further improve spatial stability and boundary naturalness, we introduce a time-varying source-anchored projection mechanism with dynamic soft masks, transition regions, and temporal mask accumulation. The proposed method is plug-and-play and can be integrated with mainstream flow-matching backbones such as Stable Diffusion 3 and FLUX without any fine-tuning. Extensive qualitative and quantitative experiments demonstrate that SAM-Flow achieves accurate semantic editing while significantly improving background preservation, providing a simple and general localized editing paradigm for training-free image editing. Code is available at: https://github.com/chwbob/Sam-Flow.

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

↑