Skip to main content
Qwen-Image-Layered is a model developed by Alibaba’s Qwen team that can decompose an image into multiple RGBA layers. This layered representation unlocks inherent editability: each layer can be independently manipulated without affecting other content. Key Features:
  • Inherent Editability: Each layer can be independently manipulated without affecting other content
  • High-Fidelity Elementary Operations: Supports resizing, repositioning, and recoloring with physical isolation of semantic components
  • Variable-Layer Decomposition: Not limited to a fixed number of layers - decompose into 3, 4, 8, or more layers as needed
  • Recursive Decomposition: Any layer can be further decomposed, enabling infinite decomposition depth
Related Links:

Qwen-Image-Layered workflow

Make sure your ComfyUI is updated.Workflows in this guide can be found in the Workflow Templates. If you can’t find them in the template, your ComfyUI may be outdated.If nodes are missing when loading a workflow, possible reasons:
  1. You are not using the latest ComfyUI version (Nightly version)
  2. Some nodes failed to import at startup

Qwen-Image-Layered Decomposition

Decompose an image into editable RGBA layers for recolor, replace, resize, and reposition workflows. Qwen-Image-Layered workflow preview

Download Workflow

Download the JSON workflow file

Run on Comfy Cloud

Run ComfyUI online with zero setup
Input materials Upload this file to LoadImage node 74:

coastal_smiling_woman.png

LoadImage node 74 · coastal_smiling_woman.png
coastal_smiling_woman.png text_encoders diffusion_models vae Model Storage Location

FP8 version

By default we are using bf16, which requires high VRAM. For lower VRAM usage, you can use the fp8 version: Then update the Load Diffusion model node inside the Subgraph to use it.

Layers and output

The number of layers is set by the layers widget on the Empty Qwen Image Layered Latent node inside the Subgraph. This model regenerates the full image as well as the layers, so a generation always decodes to layers + 1 images: The first image is the full image, not a layer. In the image to layers workflow it reproduces the input image, so discard it when you only want the layers. layers accepts 0, which gives you that image on its own. Compositing all of the layers back together recreates the full image. Use it as a check: if stacking the layers does not reproduce the first image, the decomposition did not do what you wanted.

How the layers become separate images

The Empty Qwen Image Layered Latent node allocates a 5D latent shaped [batch_size, 16, layers + 1, height // 8, width // 8]. The layers sit on the third axis, the same temporal axis that video models use for frames. The LatentCutToBatch node with dim set to t moves that axis into the batch dimension, so after VAE Decode each layer is a separate image in the batch. A layer’s position in the stack is therefore its index in the batch, counting from the full image at index 0. There is no z-index field and no per-layer metadata carrying that order, so reordering or filtering the batch reorders the layers. The Qwen-Image-Layered VAE decodes to 4 channels, so the decoded layers carry an alpha channel.

Workflow settings

Sampler settings

This model is slow. The original sampling settings are steps: 50 and CFG: 4.0, which will at least double the generation time.

Input size

For input size, 640px is recommended. Use 1024px for high-resolution output.

Prompt (optional)

The text prompt is intended to describe the overall content of the input image, including elements that may be partially occluded (e.g., you may specify the text hidden behind a foreground object). It is not designed to control the semantic content of individual layers explicitly.