Your Latent Mask is Wrong: Pixel-Equivalent Latent Compositing for Diffusion Models
On the map: Diffusion models → Diffusion foundations and sampling
Abstract (arXiv)
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.
Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Placed in Diffusion foundations and sampling, one of 14 directions in Diffusion models. Builds on 15 of its 25 references that are in the map. First posted on arXiv 4 Dec 2025.
Builds on
15 of 25 references.
Closest ancestors · 2
Same direction, newest first
- 2022Scalable Diffusion Models with Transformers19 Dec
- 2021High-Resolution Image Synthesis with Latent Diffusion Models20 Dec
Other references · 13
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
- 2018The Unreasonable Effectiveness of Deep Features as a Perceptual Metriccited by 11,177
- 2023Adding Conditional Control to Text-to-Image Diffusion Modelscited by 5,503
- 2021SDEdit: Guided Image Synthesis and Editing with Stochastic Differential Equationscited by 1,937
- 2021Blended Diffusion for Text-driven Editing of Natural Imagescited by 927
- 2022DiffEdit: Diffusion-based semantic image editing with mask guidancecited by 647
- 2022Paint by Example: Exemplar-based Image Editing with Diffusion Modelscited by 489
- 2024BrushNet: A Plug-and-Play Image Inpainting Model with Decomposed Dual-Branch Diffusioncited by 202
- 2023A Task is Worth One Word: Learning with Task Prompts for High-Quality Versatile Image Inpaintingcited by 169
- 2020Bridging Composite and Real: Towards End-to-end Deep Image Mattingcited by 89
- 2024DiffEditor: Boosting Accuracy and Flexibility on Diffusion-based Image Editingcited by 88
- 2021Privacy-Preserving Portrait Mattingcited by 60
1 more
- 2023Differential Diffusion: Giving Each Pixel Its Strengthcited by 29
Built on by
Citing papers per year: 2026: 4.
4 papers.
- 2026SeeClear: Reliable Transparent Object Depth Estimation via Generative Opacificationcited by 2
- 2026Pixel-Space Diffusion Transformerscited by 1
- 2026MIRAGE: Benchmarking and Aligning Multi-Instance Image Editingcited by 0
- 2026Latent-Frequency Validity: Fast Spectral Editing with Screened Video-VAE Transfer Operatorscited by 0
- 2026Latent-Frequency Validity: Fast Spectral Editing with Screened Video-VAE Transfer Operators4 Aug 2026
- 2026Pixel-Space Diffusion Transformers20 Jul 2026
- 2026MIRAGE: Benchmarking and Aligning Multi-Instance Image Editing6 Apr 2026
- 2026SeeClear: Reliable Transparent Object Depth Estimation via Generative Opacification20 Mar 2026
Similar, not cited
Close in wording, no citation either way
- 2024Simpler Diffusion (SiD2): 1.5 FID on ImageNet512 with pixel-space diffusion
- 2023Latent Consistency Models: Synthesizing High-Resolution Images with Few-Step Inference
- 2025One Small Step in Latent, One Giant Leap for Pixels: Fast Latent Upscale Adapter for Your Diffusion Models
- 2025DiP: Taming Diffusion Models in Pixel Space
- 2026DA-VAE: Plug-in Latent Compression for Diffusion via Detail Alignment
- 2025PixPerfect: Seamless Latent Diffusion Local Editing with Discriminative Pixel-Space Refinement
- 2022Unifying Diffusion Models' Latent Space, with Applications to CycleDiffusion and Guidance
- 2026Source-Agnostic Image Translation Based on Latent Aware Adaptive Masking