Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions comfyui_embedded_docs/docs/EmptyQwenImageLayeredLatentImage/en.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Empty Qwen Image Layered Latent

The Empty Qwen Image Layered Latent node creates a blank, multi-layered latent representation for use with Qwen image models. It generates a tensor filled with zeros, structured with a specified number of layers, batch size, and spatial dimensions. This empty latent serves as a starting point for subsequent image generation or manipulation workflows.
The Empty Qwen Image Layered Latent node prepares the blank canvas that the Qwen-Image-Layered model paints onto. Think of it as a stack of clean tracing sheets clipped together in order: the model fills the first sheet with the complete picture, and each sheet after it with one part of that picture. This node decides how big the sheets are and how many of them there are. It does not draw anything itself.

## Inputs

| Parameter | Description | Data Type | Required | Range |
| --- | --- | --- | --- | --- |
| `width` | The width of the latent image to create. The value must be divisible by 16. (default: 640) | INT | Yes | 16 to MAX_RESOLUTION |
| `height` | The height of the latent image to create. The value must be divisible by 16. (default: 640) | INT | Yes | 16 to MAX_RESOLUTION |
| `layers` | The number of additional layers to add to the latent structure. This defines the depth of the latent representation. (default: 3) | INT | Yes | 0 to MAX_RESOLUTION |
| `layers` | How many layers to separate the picture into. One extra sheet is always reserved for the complete picture, so you get `layers + 1` images back, not `layers`. Set it to 2 and you get the complete picture plus 2 layers. Set it to 0 and you get the complete picture on its own. (default: 3) | INT | Yes | 0 to MAX_RESOLUTION |
| `batch_size` | The number of latent samples to generate in a batch. (default: 1) | INT | No | 1 to 4096 |

**Note:** The `width` and `height` parameters are internally divided by 8 to determine the spatial dimensions of the output latent tensor.
Expand All @@ -19,6 +19,21 @@ The Empty Qwen Image Layered Latent node creates a blank, multi-layered latent r
| --- | --- | --- |
| `samples` | A latent tensor filled with zeros. Its shape is `[batch_size, 16, layers + 1, height // 8, width // 8]`. | LATENT |

## Why you get one more image than you asked for

Qwen-Image-Layered does not only take a picture apart. It also repaints the complete picture, on its own sheet, alongside the layers. That is why the stack is always one sheet taller than the number of layers you asked for.

- **The first image is the complete picture, not a layer.** It is the same picture you already have, so throw it away when all you want are the layers.
- **Lay all the layers back on top of each other and you get the complete picture again.** If they do not add back up to that first image, the separation did not work the way you wanted, so this is a quick way to check the result.
- **Keep the sheets in order.** The stack is the only record of which layer sits on top of which. Nothing is written on the sheets themselves to say where they belong, so reordering or dropping images means reordering or losing layers.
- **The layers come out with transparency**, so they can be stacked without the lower ones being hidden behind an opaque background.

## Usage suggestions

Send the output to the sampler the way you would a normal empty latent, then put LatentCutToBatch with `dim` set to `t` before VAE Decode. That is the step that takes the stack apart into separate images, in order, starting with the complete picture.

Start with the default of 3 layers. Asking for more means a longer generation and a finer separation, and it is not worth raising until you have seen what the model does with a small number.

> This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! [Edit on GitHub](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/EmptyQwenImageLayeredLatentImage/en.md)

---
Expand Down
Loading