Save Image Advanced (TGA)
TGA with alpha, RLE on your terms, and nothing else in the way
- images
- masks
Save Image Advanced (TGA) exists because the simple TGA saver in this pack drops alpha - it converts frames straight to RGB - and TGA without alpha is missing the one thing the format is still genuinely good at. This variant flips that: connect a mask, toggle Join Alpha Channel, and you get an RGBA TGA. If you're exporting transparent sprites or textures for a pipeline that insists on TGA, this is the node that actually delivers a usable asset.
TGA's niche is old but real: game-engine texture importers, modding tooling, and assorted legacy software that never grew PNG support. The format supports 32-bit RGBA and a lossless RLE compression, and both matter here.
The inputs that matter
- RLE (default on) - toggles TGA's run-length encoding. Keep it on: RLE is lossless and shrinks flat-color sprites dramatically, which is exactly what TGA content tends to be. Turning it off is for byte-exact compatibility with something that can't read RLE TGA (rare, but it exists).
- Join Alpha Channel - clip a mask into the alpha channel. With Invert Alpha as the flip switch for inverse-mask pipelines. This is the feature the simple node is missing.
- Images + optional Masks - the data in, the alpha on the side.
- Save to Input Folder - mirrors the output into your input folder for immediate reuse.
- Filename Prefix - pack token support (
%date:yyyy-MM-dd%,%hour%,%minute%,%width%,%height%).
No outputs - terminal save node. Files land in ComfyUI/output.
What to keep in mind
The preview will lie to you again - TGA can't be rendered in ComfyUI's browser pane, so you get a PNG stand-in while the real .tga goes to disk. Check the output folder, not the thumbnail. And while RGBA TGA is supported by plenty of readers, a non-trivial number of old TGA consumers quietly ignore the alpha channel anyway, so if your target tool shows a solid rectangle where transparency should be, that's the reader, not necessarily your file.
Also worth being realistic about: if nothing in your pipeline demands TGA, PNG is the better format in every practical dimension, and this pack's TIFF/PNG savers handle alpha with more modern tooling. TGA is for the pipeline that asks for it - and for that pipeline, the alpha support here is the difference between a broken export and a finished asset.
Install
Part of ComfyUI-Image-Process:
cd ComfyUI/custom_nodes
git clone https://github.com/wakaura-asaho/comfyui-image-process
pip install -r comfyui-image-process/requirements.txt
then restart, or find the pack in ComfyUI Manager. Dependencies: numpy, Pillow 12.1+, scipy, opencv, scikit-image - no model downloads. Modern ComfyUI required (frontend ≥ 1.37, base ≥ 0.12), like the rest of the pack.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | The images to be saved. | |
| rle | BOOLEAN | true | Whether to use RLE compression when saving as TGA. |
| join_alpha | BOOLEAN | false | Clip the image with the provided mask. |
| invert_alpha | BOOLEAN | false | Whether to invert the alpha channel before saving. |
| filename_prefix | STRING | ComfyUI | The prefix for the file to save. This may include formatting information such as %date:yyyy-MM-dd% or %Empty Latent Image.width% to include values from nodes. |
| save_to_input_folder | BOOLEAN | false | Whether to sync the image to the input folder. |
| masksopt | MASK | Optional alpha channel masks to clip the saved images. If provided, these masks will be applied to the corresponding images before saving. |
Outputs (0)
No outputs