Lune

CVPR2026Top-tier venue

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

Rowan Bradbury, Dazhi Zhong

Abstract

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 pixelequivalent: 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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Adding Conditional Control to Text-to-Image Diffusion Models cites High-Resolution Image Synthesis with Latent Diffusion Models
  • Adding Conditional Control to Text-to-Image Diffusion Models cites SDEdit: Guided Image Synthesis and Editing with Stochastic Differential Equations
  • Scalable Diffusion Models with Transformers cites High-Resolution Image Synthesis with Latent Diffusion Models
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on11

  1. LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
  2. High-Resolution Image Synthesis with Latent Diffusion ModelsRobin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser et al.CVPR 2022 · 13,123 citations
  3. Adding Conditional Control to Text-to-Image Diffusion ModelsLvmin Zhang, Anyi Rao, Maneesh AgrawalaICCV 2023 · 6,759 citations
  4. Scalable Diffusion Models with TransformersWilliam Peebles, Saining XieICCV 2023 · 5,568 citations
  5. SDEdit: Guided Image Synthesis and Editing with Stochastic Differential EquationsChenlin Meng, Yutong He, Yang Song, Jiaming Song et al.ICLR 2022 · 2,128 citations

Related papers

  1. PixPerfect: Seamless Latent Diffusion Local Editing with Discriminative Pixel-Space RefinementHaitian Zheng, Yuan Yao, Yongsheng Yu, Yuqian Zhou et al.NeurIPS 2025 · 3 citations
  2. DLFormer: Discrete Latent Transformer for Video InpaintingJingjing Ren, Qingqing Zheng, Yuanyuan Zhao, Xuemiao Xu et al.CVPR 2022 · 39 citations
  3. From Inpainting to Layer Decomposition: Repurposing Generative Inpainting Models for Image Layer DecompositionJingxi Chen, Yixiao Zhang, Xiaoye Qian, Zongxia Li et al.CVPR 2026 · 5 citations
  4. LoRAShop: Training-Free Multi-Concept Image Generation and Editing with Rectified Flow TransformersYusuf Dalva, Hidir Yesiltepe, Pinar YanardagNeurIPS 2025 · 13 citations
  5. DiffHarmony++: Enhancing Image Harmonization with Harmony-VAE and Inverse Harmonization ModelPengfei Zhou, Fangxiang Feng, Guang Liu, Ruifan Li et al.ACM MM 2024 · 4 citations
Dusk over the sea between two cliffs drawn in fine vertical lines