Nodes/ComfyUI-Image-Process/Save Image Advanced (TGA)
ComfyUI Node

Save Image Advanced (TGA)

TGA with alpha, RLE on your terms, and nothing else in the way

By wakaura-asaho·Created 5 months ago·Updated 2 months ago· 1
Save Image Advanced (TGA)
  • images
  • masks
    rletrue
    join_alphafalse
    invert_alphafalse
    filename_prefixComfyUI
    save_to_input_folderfalse

    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.

    CategoryWakaura

    Inputs (7)

    NameTypeDefaultDescription
    imagesIMAGEThe images to be saved.
    rleBOOLEANtrueWhether to use RLE compression when saving as TGA.
    join_alphaBOOLEANfalseClip the image with the provided mask.
    invert_alphaBOOLEANfalseWhether to invert the alpha channel before saving.
    filename_prefixSTRINGComfyUIThe 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_folderBOOLEANfalseWhether to sync the image to the input folder.
    masksoptMASKOptional 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