Nodes/Allor Plugin/AlphaChanelRemove
ComfyUI Node

AlphaChanelRemove

Drop the alpha and get plain RGB back

By Nourepide·Created 3 years ago·Updated 2 years ago· 295
AlphaChanelRemove
  • images
  • IMAGE

AlphaChanelRemove is the bluntest member of Allor's alpha family: it takes an RGBA image and cuts the alpha channel off, leaving plain 3-channel RGB. That's it - one images input, one IMAGE output, no parameters, and nothing clever about the implementation. If an image already has no alpha, it's a harmless no-op.

Why would you ever want to throw away transparency? Because not everything downstream handles RGBA gracefully. ComfyUI's native VAE encode/decode, several filter nodes, and some compositing setups assume three channels, and feeding them a 4-channel tensor is how you get cryptic shape-mismatch errors in the middle of an otherwise fine graph. After a background-removal pass leaves you with a beautiful cutout, the simplest fix for a consumer that wants plain RGB is to strip the alpha right before that node. You lose the transparency - but if the next step doesn't use it, that's fine, and the graph keeps working.

It's the sibling of AlphaChanelAdd (which adds an opaque alpha), AlphaChanelRestore (which resets a broken alpha to opaque instead of deleting it), and the other "Chanel" nodes - all misspelled with one L, which is this pack's recurring quirk. The family is the plumbing you use to keep channel counts consistent across a graph.

One thing worth stating plainly: stripping alpha is destructive in the sense that the transparency information is gone from that tensor. If you might need it later - a save, a composite, an AlphaChanelAsMask call - branch the image before this node so one copy stays RGBA. It costs one wire and saves a re-run.

Installing it

It's part of the Allor plugin:

cd ComfyUI/custom_nodes
git clone https://github.com/Nourepide/ComfyUI-Allor
cd ComfyUI-Allor
pip install -r requirements.txt

Restart ComfyUI, or search "Allor" in ComfyUI Manager. Pack-level notes: requirements.txt drags in rembg and onnx for the segmentation nodes even though this node is pure tensor slicing, and Allor's repo was rebased to strip images from git history - a change that can break auto-updates, with troubleshooting pages in the docs at nourepide.github.io/ComfyUI-Allor-Doc.

Real talk

A node that just deletes a channel is easy to dismiss, but channel-count errors are one of the most common "why is my graph suddenly broken" mysteries in ComfyUI, and this is the two-second fix. The one habit to build: think about whether anything else needs that alpha before you strip it. Cut it too early and you're re-running the whole pipeline to get transparency back; branch first and it's free.

Categoryimage/alpha

Inputs (1)

NameTypeDefaultDescription
imagesIMAGE

Outputs (1)

NameTypeDescription
IMAGEIMAGE