Abstract
Controllable Layer Decomposition (CLD) is a novel framework designed to reverse the image flattening process by decomposing a single raster image into its constituent, editable RGBA layers. By utilizing Diffusion Transformers (DiT) and user-defined bounding boxes, CLD addresses the limitations of traditional multi-stage pipelines that suffer from error propagation and artifacts in complex scenes. Our approach introduces a Multi-Layer Conditional Adapter (MLCA) and Layer-Aware Rotary Position Embedding (LA-RoPE) to ensure structural alignment and hierarchical consistency. Experimental results on the PrismLayersPro and Crello datasets demonstrate that CLD significantly outperforms existing state-of-the-art methods in layer quality and reconstruction fidelity, enabling seamless integration into professional design workflows.
Introduction
In professional design workflows, creators typically work with independent layers—text, foreground objects, and backgrounds—which are eventually "flattened" into a single raster image (e.g., PNG or JPG). This process is traditionally irreversible. Modifying a flattened image, such as moving a piece of text or removing an object, requires tedious manual masking and inpainting to fill the resulting gaps.
Existing automated methods often rely on a pipeline of object detection, image matting, and inpainting. However, these pipelines are prone to "error propagation," where inaccuracies in early stages, like messy edges in matting, degrade the final output. Furthermore, these methods struggle with crowded scenes where objects heavily overlap, often failing to capture the alpha channel (transparency) correctly or leaving behind visual artifacts. CLD proposes to treat layer decomposition as a unified conditional generation task, effectively "un-baking the cake" to retrieve original, editable components.
The CLD Framework
The authors propose CLD as a generative approach that avoids the pitfalls of multi-stage editing by generating all layers simultaneously.
LayerDecompose-DiT (LD-DiT)
Built on the FLUX.1 [dev] architecture, LD-DiT generates visual tokens for multiple layers at once. Unlike standard models that generate a single image, LD-DiT produces a sequence of tokens representing the background and every specified foreground layer, ensuring that the background is correctly inpainted behind foreground elements.
Multi-Layer Conditional Adapter (MLCA)
The MLCA serves as the framework's control center. It processes the original image and user-provided bounding boxes, crops relevant features, and injects them into the model. This ensures that the generated layers remain structurally aligned with the source image.
Layer-Aware Rotary Position Embedding (LA-RoPE)
Standard positional embeddings typically account for 2D spatial coordinates (height and width). CLD extends this to 3D by including a layer index. This allows the model to understand the hierarchical relationship and depth order of elements, which is critical for accurate decomposition.
Transparency-Aware Decoding and Dual-Condition CFG
Since standard Variational Autoencoders (VAEs) handle only RGB data, the framework utilizes a specialized multi-layer transparent autoencoder to preserve the alpha channel. Additionally, a "Dual-Condition" Classifier-Free Guidance (CFG) strategy is used during inference. By keeping the original image as a structural anchor in both conditional and unconditional branches, the model avoids hallucinating new content and stays focused on decomposing existing pixels.
Experimental Results
Datasets and Benchmarks
The model was trained and evaluated on several key datasets:
- PrismLayersPro: A high-quality dataset of 20,000 samples across 21 visual styles (e.g., 3D, cartoon, neon) with ground-truth layer information.
- Crello: A dataset of professional graphic layouts used to test performance on complex, real-world designs.
- New Evaluation Suite: The authors introduced metrics for layer-level quality (PSNR, SSIM), mask-level accuracy (IoU, F1), and reconstruction fidelity.
Performance Analysis
CLD demonstrates significant quantitative and qualitative improvements over previous methods. On the Crello dataset, it improved the Alpha Soft IoU from 0.70 to 0.77 compared to the previous state-of-the-art, LayerD.
Visually, CLD produces much sharper edges for text and complex shapes, avoiding the "halos" or blurry boundaries common in traditional matting methods. The resulting layers are clean enough to be imported directly into presentation software like PowerPoint, where they can be manipulated as independent assets.
Conclusion
Controllable Layer Decomposition represents a significant step forward in making raster images editable. By treating decomposition as a simultaneous generative task, CLD achieves high-fidelity separation of overlapping elements. While the model currently faces challenges with extremely fine details and extreme occlusions due to resolution constraints, future work involving multi-scale features and higher-resolution processing holds promise for further refining this "un-baking" process.
Summary updated