ComfyUI Node

Image Saver

A ComfyUI node in Zuellni/Image with 6 inputs and 0 outputs.

By Zuellni·Created 3 years ago·Updated 3 years ago· 44
Image Saver
  • images
  • masks
    output_dir/tmp/ComfyUI/output
    formatpng
    optimizefalse
    fps0

    ComfyUI's built-in save nodes are great - right up until you don't want your whole workflow embedded in the PNG, or you want to save a batch as one file. Image Saver saves images with no metadata at all, and it can turn a batch into a grid or an animated GIF in the same node. It's the pack's answer to "just write the pixels, thanks."

    What it is

    Image Saver is an output node - it takes images, writes them to a folder, and returns nothing. The two reasons to reach for it over core SaveImage:

    1. No metadata. Core SaveImage bakes the workflow JSON into PNG chunks, which is great for sharing and reconstructing - and annoying when you want clean files (for a training set, a gallery, or just because you don't want your secrets in a PNG). Image Saver writes bare images.
    2. Batch output as one file. A batch of frames can go out as a single animated GIF or a contact-sheet grid, which core nodes don't do natively.

    The inputs that matter

    | Input | Default | What it does | |---|---|---| | output_dir | ComfyUI output | Any path; the node creates it if missing. | | format | png | png, jpg, gif, or grid. The first three are what they say; grid composites the whole batch into one image. | | fps | 0 | Dual-purpose: for gif it's the frame rate (0 = as fast as possible), for grid it's the number of columns. | | optimize | false | Passes PIL's optimize flag to the encoder - slightly smaller files, slightly slower saves. | | masks (optional) | - | If connected, appended as the alpha channel, so you can save image + transparency in one file. |

    A quiet detail: files are saved with random hex names (16 hex chars). No sequence numbering, no prompt-based naming - if you need deterministic filenames, this isn't the node; it's built for "dump and move on."

    The format quirks

    • GIF: the first frame plus append_images for the rest, with disposal=2 (which keeps GIF artifacts down compared to the naive save). fps=0 gives no frame delay - effectively a flipbook. For a real animation, set it, e.g. 12–30.
    • Grid: fps doubles as column count. 0 means "square-ish auto": it computes ceil(sqrt(batch_size)) columns. It's a JPEG grid (the node hardcodes jpg for grids), so expect mild compression.
    • PNG/JPG: one file per image in the batch.

    Pairing it with the pack

    The natural loop is Image Batch → process → Image Saver: load a folder, run it through img2img or upscaling, save the results clean. Since both nodes are metadata-free and directory-based, you can run batch jobs without ever touching the built-in browser or dealing with workflow-embedded JSON. For that loop, this is the right save node.

    Install

    Part of Zuellni/ComfyUI-Custom-Nodes, via ComfyUI Manager (search "Zuellni") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Zuellni/ComfyUI-Custom-Nodes
    

    Needs only Pillow and torchvision (both ship with ComfyUI) - no extra requirements, no downloads. The pack is archived, but this node is thin, stable code; it'll keep working long after fancier nodes have rotted. One tip: since it writes anywhere and skips the usual ComfyUI output browser, double-check your output_dir the first time - "where did my image go" is the #1 question this node gets, and the answer is almost always "exactly where you typed."

    CategoryZuellni/Image

    Inputs (6)

    NameTypeDefaultDescription
    imagesIMAGE
    output_dirSTRING/tmp/ComfyUI/output
    formatCOMBOpng4 options: gif, grid, jpg, png
    optimizeCOMBOfalse2 options: false, true
    fpsINT00–1000
    masksoptMASK

    Outputs (0)

    No outputs