Eric Qwen Add Alpha (RGBA)
The boring-but-essential node that makes your image compatible with the RGBA VAE
- image
- mask
- rgba_image
Here's a subtle thing about the Qwen layered model: its VAE works on 4-channel RGBA images, but ComfyUI's Load Image node hands you 3-channel RGB. That one missing channel is the difference between a working native workflow and a silent dimension mismatch. EricQwenAddAlpha exists to fill it in.
What it does
It takes an image and gives it an alpha channel, returning rgba_image. Where does the alpha come from? Two ways:
- If you wire in a
mask, that becomes the alpha channel (resized to match if the dimensions differ). - If you don't, every pixel gets the constant
alpha_value, default1.0- fully opaque.
If the input is already RGBA, it passes through untouched. So the default usage is: Load Image → Add Alpha → encode with the RGBA VAE. The result is a 4-channel image that the Qwen layered VAE actually knows how to read.
Why this node exists at all
It's part of the pack's native workflow - the experimental branch that drives Qwen-Image-Layered through ComfyUI's own model loading (KSampler, standard conditioning) instead of the diffusers pipeline the Decompose node uses. In that setup you're on the hook for providing the right input formats yourself, and this node is the adapter that bridges ComfyUI's RGB world into the layered model's RGBA world.
The mask path is the more interesting one: wire a real mask and you can force which parts of the reference image the model treats as transparent before it ever sees the latent. That's a lever the basic solid-alpha version doesn't give you, and it's worth playing with if you're doing layered edits that should ignore part of the source.
Where it fits
In a native workflow the chain looks roughly like: Load Image → Add Alpha → Eric Qwen Encode (with the RGBA VAE) → Multi-Layer Latent → KSampler → Latent Cut to Batch → VAE Decode → Layer Extract → Save. Add Alpha is the first link - skip it and your encode starts with the wrong channel count.
One note: this is in the pack's experimental "Native" category, so treat it as a building block for tinkering rather than a polished production node. Install the pack via ComfyUI Manager (search "Eric Qwen") or git clone https://github.com/EricRollei/Qwen_Layers_Diffuser_Pipeline_Comfyui into custom_nodes, then restart. No model, just a channel concat.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| maskopt | MASK | — | |
| alpha_valueopt | FLOAT | 1.000–1 | Alpha value if no mask provided (1.0 = fully opaque) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| rgba_image | IMAGE | — |