πΎ Save & Strip Alpha (FSL)
πΎ Save & Strip Alpha (FSL) β flatten RGBA to RGB and write it out safely
- image_rgba
- image_rgb
The FSL pack's transparent-PNG finisher. FSL Save And Strip Alpha takes an RGBA image, converts it to plain RGB - discarding the alpha channel - and saves it as a PNG, then returns the flattened RGB image as a tensor. It's the sibling of the pack's alpha-handling family (Manual Alpha Mask Painter makes alpha, Composite With Mask uses it, this one drops it), and the README marks it [Legacy].
Why you'd need to strip alpha
Alpha channels are a liability at the wrong moment. Plenty of downstream consumers - print shops, some upscalers, web tooling, esrgan-style models - choke on or silently misread RGBA files. If your workflow produced a masked/transparent image (say a T-shirt design with a punched-out background) and you now need a clean, flat RGB file for delivery, this is the node. The flattening is the point: convert("RGB") bakes the alpha away, and what's left is a normal three-channel PNG nobody will argue with.
There's also a second, quieter benefit in the code: safe filename handling. The node sanitizes your filename - it strips directory components, replaces slashes with underscores, and forces a valid extension (.png if you didn't supply one) - and resolves the save path so it can't escape the output area. Sloppy input can't write outside your ComfyUI output folder, which is a small but real security win given how many custom nodes just trust the user.
The inputs
image_rgba(required) - an RGBA IMAGE tensor. Feed it from anything with an alpha channel: the alpha painter's output, a compositor, or a save path that preserves transparency.filename- what to call it. Defaultoutput_rgb.png. The node sanitizes it and appends.pngif needed.save_dir- where to write it. Default./outputs. Keep it inside ComfyUI's output area; the sanitizer re-resolves under this path.
Output: image_rgb - the flattened RGB tensor, so the node can sit mid-graph too, not just at the end. If you only want the file, ignore the output and let it be the graph's tail.
When to reach for it
- Delivery. You've got a transparent design and the destination wants flat RGB.
- Compat shim. An RGBA tensor is breaking a downstream node; strip here instead of hunting for a converter.
- Archive. Alpha can be lost silently by other tools - strip and flatten deliberately, on your terms.
Install & the honest note
Same pack install: ComfyUI Manager β "ComfyUI FSL Nodes", or clone + pip install -r requirements.txt, restart. Local-only, no key.
The honest note is that it's legacy for a reason: the pack's direction moved to the metadata-aware FSLImageSaverWithMetadata for saving, and you can get the same flatten with stock ComfyUI nodes plus a plain Save Image. Keep this one around if you want the explicit "strip alpha and sanitize filename" behavior in one node, or if an old workflow already calls it - it's small, stable, and does exactly what it says.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image_rgba | IMAGE | β | |
| filename | STRING | output_rgb.png | β |
| save_dir | STRING | ./outputs | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image_rgb | IMAGE | β |