Light-Tool: RGB To RGBA
Adding an alpha channel when a node demands four
- image
- image
Every once in a while you hit a node that requires an RGBA image - it wants to read an alpha channel, or it composites in a way that assumes one - and your image shows up as plain three-channel RGB. Light-Tool: RGB2RGBA is the two-second fix: it converts your image to RGBA, adding a fully opaque alpha channel, and hands it back.
That's the whole job. It's a per-image Pillow .convert("RGBA") followed by re-stacking the batch into a single tensor. No compositing, no color change, no surprises.
When you'd actually use this
Honestly, it's a niche utility, and the honest take is that you'll reach for it less often than its sibling RGBA2RGB. It earns its keep in a few concrete spots:
- Feeding a node that reads alpha. Some overlay and compositing nodes in other packs assume every input is RGBA and will error or misbehave on a 3-channel tensor. This is the adapter.
- Building RGBA intermediates for inspection. If you're sanity-checking channel counts before a save, forcing the format removes one variable.
- Batch consistency. If your workflow mixes RGB and RGBA sources and a downstream node needs uniform shape, normalizing everything to RGBA up front is cleaner than handling the mismatch later.
One thing to note: the added alpha is fully opaque everywhere, so the image looks identical. It's purely a format change - it doesn't give you transparency, it just makes the format four channels so nodes that expect four stop complaining.
Inputs and output
Single image input, single image output. Nothing to configure, no enum, no slider - if you can wire an image in, you can use the node.
Install
Standard pack install: ComfyUI Manager → search ComfyUI-Light-Tool and hit Install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/ihmily/ComfyUI-Light-Tool.git
pip install -r requirements.txt
then restart ComfyUI. The pack has no model downloads - just numpy, Pillow, and friends - and this node specifically is a straight Pillow conversion. If you find yourself needing the opposite (dropping alpha), the pack's RGBA2RGB is right there, and if you need to use alpha to put an image on a background, AddBackground is the tool for that. RGB2RGBA is the boring adapter in the middle, and sometimes boring is exactly what you need.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |