DiffDecompose: Layer-Wise Decomposition of Alpha-Composited Images via Diffusion Transformers

Zitong Wang, Hang Zhao, Qianyu Zhou, Xuequan Lu, Xiangtai Li, Hao Yang, Bo Yang, Yiren Song

TL;DR

DiffDecompose introduces a novel framework and a large-scale dataset (AlphaBlend) to tackle the challenging task of decomposing single images containing complex, non-linear semi-transparent or transparent overlapping layers. By leveraging a Diffusion Transformer with in-context learning and specialized position encoding cloning, it successfully separates entangled foreground and background layers without requiring explicit user masks.

What Problem Does This Paper Address?

Traditional image editing and inpainting methods excel at removing solid, opaque objects using bounding boxes or masks. However, they fail completely when dealing with transparency or semi-transparency—such as lens flares, reflections on glassware, X-ray scans, or watermarks.

In these scenarios, the foreground and background are non-linearly blended, meaning pixels contain a mixture of information from both layers. This creates severe layer ambiguity because color and transparency are deeply entangled on the same visual plane, lacking clear depth or edge contrast boundaries. Furthermore, the computer vision community has lacked high-quality, large-scale datasets to train models for this specific problem, forcing previous methods to rely on synthetic AI-generated data that fails to capture real-world physics.

Methods

The authors propose DiffDecompose, a framework built on a Diffusion Transformer (DiT) architecture (specifically fine-tuning the Flux architecture via LoRA). The method consists of three core components:

  • AlphaVAE Fine-tuning: The authors fine-tune an AlphaVAE model to accurately extract spatial latent features from RGBA images, ensuring the model can handle transparency channels natively.
  • In-Context Decomposition (ICD): Instead of directly regressing alpha mattes, the model treats decomposition as a context-aware spatial separation problem. It concatenates the clean composite image token with noisy foreground and background tokens, using bidirectional multi-modality attention to jointly predict the separated layers based on textual prompts.
  • Layer Position Encoding Cloning (LPEC): To prevent the model from mixing up features between overlapping layers, LPEC injects distinct but coordinated positional encodings into the foreground and background tokens. This maintains strict pixel-level correspondence while enforcing semantic independence between the layers.

Datasets

The paper evaluates its approach on two primary datasets:

  • AlphaBlend (New): The first large-scale, high-quality dataset explicitly designed for transparent and semi-transparent layer decomposition. It covers six distinct real-world subtasks: Translucent Flare Removal, Translucent Occlusion Removal (e.g., fog/rain), Semi-transparent Watermark Removal, Transparent Glassware Decomposition, Semi-transparent Cell Decomposition, and X-ray Contraband Decomposition. Each domain contains 5,000–10,000 training images and 300–500 test images.
  • LOGO Benchmark: A public dataset used to evaluate the model's performance on structured watermark/logo removal across three test sets (LOGO-H, LOGO-L, and LOGO-G).
Figure 1. We propose a novel generative task Layer-Wise Decomposition of Alpha-Composited Images (LDAC), to recover constituent layers from single overlapped images under the condition of semi-transparent/transparent layer non-linear occlusion. We present the Alph- aBlend dataset, the first large-scale dataset for transparent and semi-transparent layer decomposition, supporting six real-world subtasks. Highlights the dataset’s broad coverage across categories e.g., flare, fog, glassware, X-ray contraband.

Key Insights and Ideas

  • Moving Beyond Masks: Traditional mask-based inpainting is fundamentally ill-suited for transparency because deleting the "occluded" region throws away the background information entirely. DiffDecompose demonstrates that treating decomposition as a joint posterior distribution estimation problem preserves both layers cleanly.
  • Orthogonal Position Encodings: The "aha moment" for separating overlapping layers lies in the LPEC strategy. By keeping the positional encodings of the foreground and background mathematically distinct (orthogonal spatial spaces), the network learns to avoid feature bleeding and hue shifts, even when objects occupy the exact same pixels.

Key Results

DiffDecompose significantly outperforms state-of-the-art inpainting and editing methods (such as SDXL-inpainting and Inpaint Anything).

  • Quantitative Improvement: On average, it achieves a 36.3% reduction in RMSE, a 1.2% improvement in SSIM, and a 52.8% improvement in LPIPS across the benchmarks.
  • Global Occlusion Handling: In complex scenarios involving full-image global degradations (like flare and fog) where mask-dependent baselines fail entirely, DiffDecompose achieves up to 4× lower RMSE and 3× better LPIPS than competing baselines.

Limitations and Future Work

Not discussed in the paper.

Summary updated

BibTeX
@inproceedings{wang2026diffdecompose,
  author = {Zitong Wang and Hang Zhao and Qianyu Zhou and Xuequan Lu and Xiangtai Li and Hao Yang and Bo Yang and Yiren Song},
  title = {{DiffDecompose: Layer-Wise Decomposition of Alpha-Composited Images via Diffusion Transformers}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=WDRJ51ta5U},
}
Figure