图像编辑与可控生成 · CVPR2026 ·2026.06.03

你的潜变量掩码是错的:面向扩散模型的像素等价潜变量合成

Your Latent Mask is Wrong: Pixel-Equivalent Latent Compositing for Diffusion Models

Rowan Bradbury、Dazhi Zhong

与你有关的部分

把「潜空间合成应当等价于像素空间合成」作为设计准则,用一个轻量 Transformer 预测逐通道混合权重与离流形残差修正,使扩散模型在 8 倍压缩的 VAE 潜变量上也能实现全分辨率掩码与软边缘 alpha 合成;做图像修复、局部编辑或任何需要掩码融合的扩散流程时,可直接替换线性潜变量插值这一环节,且无需微调骨干网络。

原文依据 An equivalent latent compositor should be the same as compositing in pixel space.
可迁移到 图像修复可控图像生成局部图像编辑

摘要译文

由模型翻译 · 术语统一 · 请对照原文核对关键结论

扩散模型中的潜变量图像修复至今几乎普遍依赖在下采样掩码下对变分自编码器潜变量做线性插值。我们提出图像潜变量合成的一条关键原则:像素等价潜变量合成(PELC)。一个等价的潜变量合成器应当与在像素空间中合成得到相同结果。该原则使得即便变分自编码器在空间上将图像压缩 8 倍,仍能实现全分辨率掩码控制与真正的软边缘 alpha 合成。现代变分自编码器所捕获的全局上下文超出了与图像块对齐的局部结构,因此线性潜变量混合无法做到像素等价:它会在掩码接缝处产生明显伪影,并带来全局退化与颜色偏移。我们提出 DecFormer,一个 7.7M 参数的 Transformer,用于预测逐通道混合权重以及一个离流形残差修正,从而实现与掩码一致的潜变量融合。DecFormer 的训练目标是使融合后的解码结果与像素空间 alpha 合成相匹配,它可与现有扩散流程即插即用,无需微调骨干网络,仅增加 FLUX.1-Dev 参数量的 0.07% 与 3.5% 的 FLOPs 开销。在 FLUX.1 系列上,DecFormer 恢复了全局颜色一致性、软掩码支持、清晰边界与高保真掩码,将边缘附近的误差指标相对标准掩码插值最多降低 53%。作为图像修复先验使用时,在 FLUX.1-Dev 上搭配 DecFormer 的轻量低秩适配可达到与完全微调的修复模型 FLUX.1-Fill 相当的保真度。尽管我们聚焦于图像修复,PELC 是像素等价潜变量编辑的通用方案,我们在一项复杂的颜色校正任务上对此进行了验证。

英文原文摘要 1604 字符

Latent inpainting in diffusion models still relies almost universally on linearly interpolating VAE latents under a downsampled mask. We propose a key principle for compositing image latents: Pixel-Equivalent Latent Compositing (PELC). An equivalent latent compositor should be the same as compositing in pixel space. This principle enables full-resolution mask control and true soft-edge alpha compositing, even though VAEs compress images 8x spatially. Modern VAEs capture global context beyond patch-aligned local structure, so linear latent blending cannot be pixel-equivalent: it produces large artifacts at mask seams and global degradation and color shifts. We introduce DecFormer, a 7.7M-parameter transformer that predicts per-channel blend weights and an off-manifold residual correction to realize mask-consistent latent fusion. DecFormer is trained so that decoding after fusion matches pixel-space alpha compositing, is plug-compatible with existing diffusion pipelines, requires no backbone finetuning and adds only 0.07% of FLUX.1-Dev's parameters and 3.5% FLOP overhead. On the FLUX.1 family, DecFormer restores global color consistency, soft-mask support, sharp boundaries, and high-fidelity masking, reducing error metrics around edges by up to 53% over standard mask interpolation. Used as an inpainting prior, a lightweight LoRA on FLUX.1-Dev with DecFormer achieves fidelity comparable to FLUX.1-Fill, a fully finetuned inpainting model. While we focus on inpainting, PELC is a general recipe for pixel-equivalent latent editing, as we demonstrate on a complex color-correction task.

标签

会议 CVPR2026
页码 18630-18639
Bibkey
来源 CVF Open Access