Eric Qwen Layer Info
Stop guessing what's in your layer batch — this node tells you
- layers
- alpha_masks
- layer_info_json
- layer_preview
- layer_count
When your Decompose node returns six layers and you're not sure what's actually in them - or worse, whether one of them came back empty - you could wire everything up blind and pray. Or you could drop in EricQwenLayerInfo, which measures the batch and shows you exactly what you're dealing with.
What it reports
Give it layers (and optionally alpha_masks) and it computes per-layer stats: alpha coverage percentage, whether the layer has any transparency at all, and dimensional info. All of that comes back as layer_info_json (STRING), a structured JSON you can read with any text view node or feed into other tooling. You also get layer_count as a clean INT - handy when you're routing on "how many layers did the model actually produce this run."
The third output is the fun one: layer_preview, an IMAGE that arranges the layers for you. The preview_mode dropdown controls the layout - grid, stack_vertical, stack_horizontal, or thumbnails - and thumbnail_size (32–512) sets how big those previews are. Wire it into a preview node and you get a single glanceable image of the whole stack instead of hunting through separate layer previews.
Why you'd reach for it
Two situations make this node worth the two seconds to add. First, debugging a decomposition: coverage numbers instantly reveal the failure modes - a layer with 100% opaque coverage is probably the background swallowing everything; a layer with 2% coverage is nearly empty and probably not worth saving. Second, automation: if you're building a batch workflow that decomposes a folder of images, layer_count and the JSON give you something to branch on, like "skip saving if the model only made 3 layers."
Honest note: it's not an output node, so it won't stop the graph on its own - wire layer_preview somewhere visible or it's just compute for nothing.
Install is the pack standard - ComfyUI Manager (search "Eric Qwen") or git clone https://github.com/EricRollei/Qwen_Layers_Diffuser_Pipeline_Comfyui into custom_nodes, then restart. No model, no downloads; pure analysis.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| layers | IMAGE | — | |
| alpha_masksopt | MASK | — | |
| preview_modeopt | COMBO | grid | How to display layer preview |
| thumbnail_sizeopt | INT | 12832–512 | Size for thumbnail previews |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| layer_info_json | STRING | — |
| layer_preview | IMAGE | — |
| layer_count | INT | — |