Source-linked AI summary
Qwen-Image-Layered: Towards Inherent Editability via Layer Decomposition
Yin, Shengming, Zhang, Zekai, Tang, Zecheng, Gao, Kaiyuan, Xu, Xiao, Yan, Kun, Li, Jiahao, Chen, Yilei, Chen, Yuxiang, Shum, Heung-Yeung, Ni, Lionel M., Zhou, Jingren, Lin, Junyang, Wu, Chenfei
TL;DR
Image editing often changes unedited content because raster images entangle visual elements. Qwen-Image-Layered decomposes RGB images into semantically disentangled RGBA layers, and experiments show significantly better decomposition quality and consistency-preserving editing than existing approaches.
Problem
Image editing struggles to preserve unedited regions, while high-quality multilayer training images remain scarce.
Method
Qwen-Image-Layered uses an end-to-end diffusion model with shared RGBA latents, variable-layer decomposition, and multistage training to produce independently editable layers.
Results
Experiments show that Qwen-Image-Layered significantly outperforms existing approaches in decomposition quality and consistency-preserving image editing.
Takeaways & Limitations
Layered RGBA representations provide inherent editability by isolating edits to target layers while leaving other content unchanged.
Abstract
from arXiv · showhide
Recent visual generative models often struggle with consistency during image editing due to the entangled nature of raster images, where all visual content is fused into a single canvas. In contrast, professional design tools employ layered representations, allowing isolated edits while preserving consistency. Motivated by this, we propose \textbf{Qwen-Image-Layered}, an end-to-end diffusion model that decomposes a single RGB image into multiple semantically disentangled RGBA layers, enabling \textbf{inherent editability}, where each RGBA layer can be independently manipulated without affecting other content. To support variable-length decomposition, we introduce three key components: (1) an RGBA-VAE to unify the latent representations of RGB and RGBA images; (2) a VLD-MMDiT (Variable Layers Decomposition MMDiT) architecture capable of decomposing a variable number of image layers; and (3) a Multi-stage Training strategy to adapt a pretrained image generation model into a multilayer image decomposer. Furthermore, to address the scarcity of high-quality multilayer training images, we build a pipeline to extract and annotate multilayer images from Photoshop documents (PSD). Experiments demonstrate that our method significantly surpasses existing approaches in decomposition quality and establishes a new paradigm for consistent image editing. Our code and models are released on \href{https://github.com/QwenLM/Qwen-Image-Layered}{https://github.com/QwenLM/Qwen-Image-Layered}
1. Introduction
Qwen-Image-Layered addresses inconsistent image editing by replacing entangled raster representations with semantically decomposed RGBA layers, enabling isolated edits that preserve unedited content. It introduces an end-to-end decomposer with shared RGB/RGBA latents, variable-layer architecture, multi-stage adaptation, and PSD-derived training data.
- Introduction: Entangled raster images fuse visual content into one canvas, causing edits to propagate through coupled semantics and geometry and produce inconsistency in unedited regions.Existing global methods cannot ensure consistency, while mask-guided local methods struggle with complex scenes involving occlusions.
- Introduction: Qwen-Image-Layered decomposes a single RGB image into multiple semantically disentangled RGBA layers, enabling independent manipulation while preserving other content.The layered representation physically isolates edits to target layers, addressing semantic drift and geometric misalignment.
- Introduction: A PSD-based pipeline filters and annotates multilayer images from real-world Photoshop documents to address the scarcity of high-quality multilayer training data.The pipeline supplies multilayer image data for training the proposed decomposer.
- Introduction: The model combines an RGBA-VAE for shared RGB/RGBA latent representations, VLD-MMDiT for variable-layer decomposition, and multi-stage training to adapt a pretrained generator.These components support decomposition into a variable number of layers while adapting an existing image generation model into a multilayer decomposer.
2. Related Work
Prior work spans global or mask-guided image editing, image decomposition into increasingly structured layers, and multilayer image synthesis. These approaches motivate layered representations for more controllable image manipulation and generation.
- Image Editing: Image editing broadly follows global regeneration or mask-guided local editing, with global methods supporting holistic changes such as expression editing and style transfer [9] [21] [26] [39] [42] [43].Qwen-Image-Edit [42] combines semantic features from Qwen-VL [3] with reconstructive features from a VAE [19].
- Image Decomposition: Image decomposition has progressed from color-space segmentation [37] to object-level natural-scene decomposition [28] [30] and multiple RGBA-layer representations [18].PCNet recovers fractional object masks and contents through self-supervised learning.
- Multilayer Image Synthesis: Multilayer image synthesis includes two-layer autoencoder and diffusion pipelines such as Text2Layer [50], alongside transparent-latent VAE and shared-attention LoRA generation in LayerDiffusion [49].Text2Layer [50] trains diffusion on latent representations, while LayerDiffusion [49] generates foreground and background layers.
3. Method
Qwen-Image-Layered directly decomposes an RGB image into a variable number of semantically disentangled RGBA layers that reconstruct the input through sequential alpha blending. Its method combines a shared RGBA-VAE, VLD-MMDiT with Layer3D RoPE, and progressive multi-stage training to adapt a pretrained image generator for multilayer decomposition.
- Overall framework: The model maps an RGB image to N RGBA layers, each containing RGB values and an alpha matte, with the original image reconstructed by sequential alpha blending.For each layer, Ci = αi · RGBi + (1 − αi) · Ci−1, and the final composite satisfies I = CN.
- RGBA-VAE: RGBA-VAE encodes both RGB and RGBA images in a shared latent space, narrowing the input-output distribution gap and independently representing each layer without layer-dimension compression.The VAE extends the pretrained three-channel encoder and decoder to four channels, trains on RGB images with alpha set to 1, and uses reconstruction, perceptual, and regularization losses.
- VLD-MMDiT: VLD-MMDiT decomposes a variable number of layers in one model by concatenating image and layer sequences for multimodal attention and adding a layer dimension through Layer3D RoPE.The architecture models inter-layer and intra-layer relationships directly rather than recursively decomposing background and foreground layers.
- Training objective: The decomposition objective uses Flow Matching: target RGBA latents are paired with Gaussian noise and trained with mean squared error between predicted and ground-truth velocities, conditioned on the RGB latent and text representation.The input image is encoded with RGBA-VAE, while Qwen2.5-VL [3] can automatically generate the image caption used as text conditioning.
- Multi-stage training: Multi-stage training progresses from text-to-RGB/RGBA, to text-to-multiple-RGBA, and finally image-to-multiple-RGBA decomposition.The second stage jointly predicts composite images and transparent layers, while the third adds an RGB image input and produces Qwen-Image-Layered-I2L.
4. Experiment · 4.1. Data Collection and Annotation
The authors address the scarcity of high-quality multilayer images by building a pipeline that extracts and annotates layers from real-world Photoshop PSD files. The pipeline filters anomalous and non-contributing layers and merges overly deep layer structures to improve data quality and decomposition efficiency.
- 4.1. Data Collection and Annotation: The dataset pipeline targets the shortage of high-quality multilayer images that previous studies addressed mainly with synthetic data or simple graphic-design datasets.These sources typically lack complex layouts or semi-transparent layers.
- 4.1. Data Collection and Annotation: The authors derive multilayer images from real-world PSD files and filter and annotate their constituent layers.This pipeline is intended to bridge the limitations of existing data sources.
- 4.1. Data Collection and Annotation: They collect a large PSD corpus and extract all layers using psd-tools, an open-source Python library for parsing Adobe Photoshop documents.The extraction process provides the raw multilayer representations for annotation.
- 4.1. Data Collection and Annotation: To ensure data quality, the pipeline removes layers containing anomalous elements such as blurred faces.This filtering step excludes problematic layer content before training data construction.
- 4.1. Data Collection and Annotation: The authors remove non-contributing layers that do not influence the final composite image to improve decomposition performance.Only layers affecting the composite are retained as meaningful decomposition targets.
- 4.1. Data Collection and Annotation: Because some PSD files contain hundreds of layers, the pipeline merges layers to reduce model complexity.Figure 5 summarizes layer-count distributions before and after merging and category distributions in the final dataset.
4.2. Implementation Details
Qwen-Image-Layered was developed on Qwen-Image [42] and trained in three stages using Adam [1]. Training used separate datasets for text-based RGB/RGBA generation and multilayer generation, with decomposition capped at 20 layers.
- 4.2. Implementation Details: The model was trained with Adam [1] using a learning rate of 1 × 10−5 across three stages of 500K, 400K, and 400K.
- 4.2. Implementation Details: Text-to-RGB and Text-to-RGBA generation used an internal dataset, whereas Text-to-Multi-RGBA and Image-to-Multi-RGBA used the proposed multilayer image dataset with at most 20 layers.
4.3. Quantitative Results
On Crello, Qwen-Image-Layered achieves the highest decomposition accuracy, particularly in Alpha soft IoU, while RGBA-VAE attains the best reconstruction performance across four AIM-500 metrics. The evaluation uses LayerD’s alignment protocol, and ablations validate multi-stage training and RGBA-VAE.
- Evaluation aligns variable-length layer sequences with order-aware Dynamic Time Warping and permits adjacent-layer merging to accommodate ambiguous decompositions.The protocol reports RGB L1 weighted by ground-truth alpha and Alpha soft IoU between predicted and ground-truth alpha channels.
- Qwen-Image-Layered achieves the highest decomposition accuracy on Crello, with notably higher Alpha soft IoU indicating higher-fidelity alpha channels.The comparison reports RGB L1 and Alpha soft IoU under the LayerD evaluation protocol.
- Ablations show that multi-stage training improves decomposition quality and RGBA-VAE reduces the representation-distribution gap.The study compares variants using pretrained text-to-image initialization, RGB VAE encoding, and standard 2D RoPE instead of Layer3D RoPE.
- RGBA-VAE achieves the highest PSNR, SSIM, rFID, and LPIPS scores for RGBA reconstruction on AIM-500.The reconstruction evaluation blends outputs over a solid-color background and compares RGBA-VAE with LayerDiffuse [49] and AlphaVAE [40].
4.4. Qualitative Results
Qualitative comparisons show that Qwen-Image-Layered produces coherent, semantically plausible decompositions and supports precise, consistency-preserving edits. Its multilayer generation setup is also contrasted with raster-first decomposition and prior methods that struggle with semantic coherence.
- Image Decomposition: Qwen-Image-Layered yields more coherent and semantically plausible decompositions than LayerD, whose inaccurate segmentation and inpainting artifacts make its layers unsuitable for editing.The comparison is shown in Fig. 6; Qwen-Image-Layered performs decomposition end-to-end without external modules.
- Consistency-Preserving Editing: Qwen-Image-Layered supports high-fidelity layout modification, resizing, and repositioning, while Qwen-Image-Edit-2509 struggles with these operations and introduces pixel-level shifts.Editing individual RGBA layers leaves other layers exactly untouched, enabling consistency-preserving edits.
- Text-to-Multi-RGBA Generation: For text-to-multilayer synthesis, Qwen-Image-Layered-T2L is compared with raster-first Qwen-Image-T2I followed by Qwen-Image-Layered-I2L, while ART struggles with semantically coherent outputs such as missing bats and cats.The qualitative comparison is presented in Fig. 8.
5. Conclusion
Qwen-Image-Layered is an end-to-end diffusion model that decomposes RGB images into semantically disentangled RGBA layers. This layered representation enables independent editing while preserving other content unchanged, and experiments show it outperforms existing approaches.
- Conclusion: Qwen-Image-Layered decomposes a single RGB image into multiple semantically disentangled RGBA layers.The model is end-to-end.
- Conclusion: Representing images as layer stacks enables each layer to be manipulated independently while leaving other content unchanged.This design fundamentally ensures consistency across edits.
- Conclusion: Extensive experiments demonstrate that Qwen-Image-Layered significantly outperforms existing approaches.