LayeringDiff: Layered Image Synthesis via Generation, then Disassembly with Generative Knowledge

Kyoungkook Kang, Gyujin Sim, Geonung Kim, Donguk Kim, Seungho Nam, Sunghyun ChoarXiv 2025 · DOI

Abstract

LayeringDiff introduces a novel "generation, then disassembly" paradigm for high-quality layered image synthesis. By leveraging the generative priors of large-scale text-to-image models, it decomposes a single composite image into its constituent foreground and background layers. This approach circumvents the data scarcity and computational costs associated with training layered generators from scratch, while maintaining realistic object scale and scene composition.

Introduction

Professional image editing relies heavily on layers, yet AI generation of layered content—comprising clean alpha masks and inpainted backgrounds—remains a significant challenge. Traditional methods attempt to fine-tune text-to-image models to output layers directly, but these are hampered by a lack of high-quality layered training data and a tendency to produce disproportionately large foreground objects that lose context. LayeringDiff addresses these issues by first generating a high-quality composite and then intelligently decomposing it using generative knowledge.

Methodology

The LayeringDiff pipeline consists of three distinct stages: Initial Image Generation, Foreground Determination, and the Layering Stage.

The three-stage pipeline of LayeringDiff: Generation, Determination, and Layering.

1. Initial Image Generation

A standard off-the-shelf model (e.g., SDXL) generates a composite image from a prompt. This ensures the scene has realistic proportions and diverse content from the outset.

2. Foreground Determination

Precise alpha masks are extracted using a combination of GroundingDINO for object detection, SAM for segmentation, and ViTMatte for high-quality alpha matting.

3. Layering Stage

The core of the system involves two specialized modules designed to "un-mix" the composite:

  • Foreground and Background Diffusion Decomposition (FBDD): This module adapts a pretrained latent diffusion model (LDM) to estimate what the background looks like behind the foreground (inpainting) and cleans up the foreground pixels.
  • High-Frequency Alignment (HFA): Diffusion models often lose fine details during decomposition. The HFA module uses two sub-networks (FAN and BAN) to fuse high-frequency details from the original composite back into the estimated layers.
The HFA module restores fine details, such as text and sharp textures, that are often degraded during the diffusion decomposition process.

Results and Discussion

LayeringDiff was trained on a relatively small synthetic dataset of 20,000 samples and evaluated against state-of-the-art baselines like LayerDiffuse and Text2Layer.

Quantitative Performance

The model achieved superior results in FID (121.05) and KID (0.014) for composite images, alongside leading CLIP scores, indicating better prompt alignment and overall realism. In a user study with 24 participants, LayeringDiff consistently received the highest scores for both text alignment and image quality.

Qualitative Advantages

By starting with a full composite, LayeringDiff avoids the "compositional bias" where foreground objects appear unnaturally large. The use of generative priors allows the model to more effectively "imagine" occluded background regions because it understands the semantic context of the scene (e.g., what a desert or yard should look like behind an object).

Conclusion

LayeringDiff demonstrates that decomposing a high-quality composite is a more effective path to layered synthesis than direct generation. While the model's performance is dependent on initial mask quality and faces challenges with shadow persistence in backgrounds, it represents a significant step forward in AI-assisted professional image editing by preserving scale and fine-grained detail.

Summary updated

BibTeX
@misc{kang2025layeringdiff,
  author = {Kyoungkook Kang and Gyujin Sim and Geonung Kim and Donguk Kim and Seungho Nam and Sunghyun Cho},
  title = {{LayeringDiff: Layered Image Synthesis via Generation, then Disassembly with Generative Knowledge}},
  year = {2025},
  eprint = {2501.01197},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2501.01197},
}
Figure