Save Image (RGBA)
Save Image (RGBA) — the node that actually writes your transparency
- images
This is the node at the end of the line. You've cut out a logo, kept it transparent through the pipeline, and now you want the transparency to survive onto disk. ComfyUI's stock save path is RGB-centric - alpha usually rides along as a separate MASK tensor, and plenty of workflows quietly flatten to 3 channels before the file is ever written. Save Image (RGBA) is the other half of that deal: it writes a PNG where the alpha is baked into the pixels themselves.
It's the intended finish for this pack. Load something in with Load Image (With Alpha) or Load Images From Path (RGBA), trim it with Image Alpha Crop, and save here - the whole chain keeps the 4th channel intact end to end. Miss this node and all that transparency work can evaporate at the last step.
How it works
You hand it an IMAGE tensor and a filename prefix; it writes PNGs to your ComfyUI output directory. Two implementation details matter:
- If the input tensor has fewer than 4 channels, it appends an opaque alpha channel and saves anyway. That's graceful, but it's also the trap: feed it a plain RGB image and you get a perfectly opaque PNG. This node can't invent transparency - the alpha has to actually be in the tensor when it arrives.
- The saved file carries the full workflow as PNG metadata (
promptplus anyextra_pnginfo), so you can drag the output PNG back into ComfyUI and recover the graph that made it. Standard ComfyUI niceness, worth knowing for the "how did I make this" archaeology.
It saves at compress_level 4 (a reasonable size/speed middle ground) and it only ever writes PNG - which is exactly right, because JPEG can't hold an alpha channel anyway.
The inputs
Only two, and you mostly touch one:
images- the RGBA image(s) to save. Batches work; each frame becomes its own numbered file (ComfyUI_RGBA_00001_.png,..._00002_.png, and so on).filename_prefix- the output name prefix, defaultComfyUI_RGBA.
There are no outputs. It's a terminal/output node by design - it returns its save results to the UI and stops the line.
Install
Same pack as its siblings, and the easiest install in the pack since there's nothing to download:
cd ComfyUI/custom_nodes
git clone https://github.com/swan7-py/ComfyUI-ImageAlphaCrop
then restart ComfyUI. Or search "ImageAlphaCrop" in ComfyUI Manager - it's published to the Comfy Registry, one click. No models, no pip dependencies beyond what ComfyUI already ships (numpy, torch, Pillow).
Gotchas
The one that catches people: saving an RGB image here produces an opaque PNG, and they conclude the node is broken. It's not - check that whatever's upstream actually emitted 4 channels. A quick test is to load a PNG with a real alpha channel through Load Image (With Alpha) and save it; if the transparency survives, the node's fine and the problem is upstream.
Also note it writes to the standard output folder (usually ComfyUI/output), not next to your input files - which trips people the first time they go looking. And if you were hoping for JPEG output, this isn't the node; transparency costs you PNG and this node insists on it, correctly.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | The RGBA images to save. | |
| filename_prefix | STRING | ComfyUI_RGBA | The prefix for the file to save. |
Outputs (0)
No outputs