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.


翻译:扩散模型中的潜在修复仍然几乎普遍依赖于在下采样掩码下对VAE潜在表示进行线性插值。我们提出了图像潜在合成的一个关键原则:像素等效潜在合成(PELC)。等效的潜在合成器应与像素空间中的合成相同。这一原则实现了全分辨率掩码控制和真正的软边缘阿尔法合成,尽管VAE将图像在空间上压缩了8倍。现代VAE捕获了超出块对齐局部结构的全局上下文,因此线性潜在混合无法实现像素等效:它会在掩码接缝处产生大量伪影,并导致全局质量下降和颜色偏移。我们引入了DecFormer,一个拥有770万参数的Transformer模型,它预测每通道混合权重和离流形残差校正,以实现掩码一致的潜在融合。DecFormer的训练目标是确保融合后的解码与像素空间阿尔法合成相匹配,可与现有扩散流程即插即用,无需主干网络微调,仅增加FLUX.1-Dev模型参数的0.07%和3.5%的FLOP开销。在FLUX.1系列模型上,DecFormer恢复了全局颜色一致性、软掩码支持、锐利边界和高保真掩码处理,将边缘区域的误差指标较标准掩码插值降低了高达53%。作为修复先验,在FLUX.1-Dev上结合DecFormer的轻量级LoRA实现了与完全微调的修复模型FLUX.1-Fill相当的保真度。虽然我们专注于修复任务,但PELC是实现像素等效潜在编辑的通用方案,正如我们在复杂色彩校正任务中所展示的。

0
下载
关闭预览

相关内容

【CVPR2024】掩码自解码器是有效的多任务视觉通用模型
专知会员服务
20+阅读 · 2024年3月16日
【CVPR2024】ViewDiff: 3D一致的图像生成与文本到图像模型
专知会员服务
30+阅读 · 2024年3月10日
【NeurIPS2019】图变换网络:Graph Transformer Network
NAACL 2019 | 一种考虑缓和KL消失的简单VAE训练方法
PaperWeekly
20+阅读 · 2019年4月24日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
10+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
10+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员