π§ Image Remove Alpha
Drop the transparency channel before a node chokes on it
- image
- IMAGE
A lot of nodes expect a plain RGB image - three channels - and quietly assume that's what they're getting. Feed them a PNG with transparency (four channels: RGB + alpha) and things go sideways: a shape-mismatch error, a weird tint, or a silently wrong result. ImageRemoveAlpha flattens a 4-channel image down to clean RGB so the rest of your graph stops complaining. It's boring plumbing, and it's the fix for a class of errors that look mysterious until you realize your input had an alpha channel all along.
It's from ComfyUI Essentials by cubiq (Matteo Spinelli, the ComfyUI_IPAdapter_plus author) - one of those "why isn't this in core" utilities the pack specializes in.
How it works
It takes the incoming image and removes the alpha channel, returning a three-channel RGB image. Transparent PNGs and images loaded with their alpha intact become opaque, standard images that any downstream node can handle. The pixel content of the visible RGB stays; it's the extra transparency channel that gets dropped.
The inputs and outputs that matter
image(IMAGE) - your possibly-4-channel input.IMAGE(output) - guaranteed RGB, ready for a VAE encode, a model input, or anything that doesn't want an alpha channel.
No settings. It either has an alpha to strip or it doesn't.
How to install it
ComfyUI Manager: search ComfyUI Essentials, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/cubiq/ComfyUI_essentials
pip install -r ComfyUI_essentials/requirements.txt
then restart. Nothing to download.
Common issues & troubleshooting
A downstream node threw a channel/shape error. This is the textbook cause. If a node errored on a 4-channel input - or if DebugTensorShape showed a channels dimension of 4 where you expected 3 - drop this node in before it. That's the whole fix.
My transparency is gone. That's the point - this removes it. If you need the alpha (say you're compositing the subject over a new background), don't strip it here; keep the alpha and use it as a mask instead. Use this only when the downstream node genuinely wants opaque RGB.
The transparent areas turned an odd color. When alpha is removed, whatever RGB values were sitting "under" the transparent pixels become visible. Usually that's fine, but if a transparent region reveals stray color, that's the source PNG's hidden data showing through - not a bug in the node.
Missing after a Comfy update. Essentials is maintenance-only since April 2025 and pack nodes have broken on newer builds. Update via Manager; roll ComfyUI back if it's genuinely incompatible.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | β |