potentialpaper

Your Latent Mask is Wrong: Decoder-Equivariant Compositing for Diffusion Inpainting

Rowan Bradbury, Elea Zhong

ICLR 2026 submission

Edit this page

Or clone it with git

The page gets its repository with its first edit, so start in the web editor.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

Abstract. Linearly interpolating between VAE latents using a downsampled mask field remains a common heuristic for diffusion inpainting. However, this approach systematically violates a key principle: latent compositing must respect decoder equivariance; decoding after compositing should approximate compositing after decoding. Because VAE latents capture global context rather than pixel-local structure, linear interpolation fails this requirement, producing seams, color shifts, and halos that diffusion subsequently amplifies into larger artifacts.

We propose a decoder-equivariant latent compositor (DELC) instantiated as a 14M-parameter transformer ("DecFormer") that predicts full channel blend weights and a nonlinear residual correction for mask-consistent latent fusion. DELC is trained so that decoding after latent fusion approximates pixel-space alpha compositing, enabling pixel-alpha-equivalent results directly in latent space without modifying the diffusion or VAE components. DecFormer is lightweight and FLOP-efficient at 0.07% Flux.1-Dev's parameters and 9.26% of the VAE's parameters, and is plug-compatible with existing diffusion pipelines, requiring no backbone finetuning.

In inpainting experiments with DecFormer trained on the Flux.1 family of models, DELC restores global color consistency, reduces boundary artifacts and facilitates high-fidelity masking over heuristic. We further show finetuning a lightweight LoRA on Flux.1-Dev for inpainting with a DecFormer prior achieves comparable fidelity to Flux.1-Fill, a full-parameter finetuned inpainting model. Though we demonstrate DELC on inpainting, the approach generalizes to any latent-space operation requiring decoder equivariance.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

add · history

No versions are recorded yet: its preprint, the venues it went to and what they decided, the camera-ready. Missing a version?

We don't know of a submission of this paper to a venue with open reviews. Missing a submission?

Loading the discussion…