Eric Qwen Multi-Layer Latent
The empty latent that seeds a whole stack of Qwen layers at once
- latent
Here's the secret of how Qwen-Image-Layered actually works: it doesn't generate one image with transparent regions. It generates multiple frames at once, where each frame is a layer - plus a composite frame. That's why the model is slow (with 4 layers it's rendering 6 images worth of work) and it's also why the native workflow needs a special latent. EricQwenMultiLatent is that latent: an empty tensor shaped to hold all the layers plus the composite in one shot.
What it creates
You set width and height (256–2048, stepped in 64s), num_layers (2–10), and batch_size (1–4). The node returns a LATENT with shape [batch, num_layers + 1, 16, H/8, W/8] - the +1 is the composite frame that comes first, the 16 is Qwen's latent channel count, and the /8 is the VAE's 8x spatial compression. Empty, on the GPU, ready for sampling.
That framing is exactly what the KSampler needs to start. Sample it and the model fills in all the frames together, which is the whole trick of the approach: by generating the layers jointly, the model keeps them visually consistent with each other instead of producing layers that don't reassemble into the original image.
The pipeline it belongs to
The native layered workflow:
Load Image → Add Alpha → Encode → [Multi-Layer Latent] → KSampler → Latent Cut to Batch → VAE Decode → Layer Extract → Save
Multi-Layer Latent hands the KSampler its starting tensor; downstream, Latent Cut to Batch flattens the frame dimension so the VAE can decode each layer, and Layer Extract turns the decoded batch into proper RGBA layers. Keep num_layers here in sync with the layer count you asked for in your prompt (see the pack's Layer Prompts node) - if the latent and the prompt disagree about how many layers exist, you get odd results.
Caveats
This is part of the experimental "Native" category, so expect rough edges - the pack flags it explicitly. There's no noise injected here, just zeros; the sampler handles that. And remember the empty latent is sized in latent space, so width/height are image pixels; set them to what you want the final layers to be, keeping them multiples of 64. Install via ComfyUI Manager (search "Eric Qwen") or git clone https://github.com/EricRollei/Qwen_Layers_Diffuser_Pipeline_Comfyui into custom_nodes, then restart.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 1024256–2048 | — |
| height | INT | 1024256–2048 | — |
| num_layers | INT | 42–10 | Number of layers to generate |
| batch_size | INT | 11–4 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | — |