Nodes/ComfyUI DashuaiTools/SaveImageWithName☀
ComfyUI Node

SaveImageWithName☀

ComfyUI names your files. This node lets you name them

By Hasasasa·Created about a year ago·Updated 2 months ago· 7
SaveImageWithName☀
  • image
    filename
    filename_suffix
    save_path

    ComfyUI's built-in SaveImage is fine until you need a file to land at a specific path with a specific name. Then you're squinting at timestamp-named files in the output folder and writing a script to find them. SaveImageWithName fixes exactly that: you tell it the folder, the filename, and an optional suffix, and it writes the file there. It's the kind of node that feels pointless until you're building a batch pipeline or wiring ComfyUI into something that expects a known output path.

    How it works

    Under the hood it converts your IMAGE tensor to a PIL image, handles EXIF orientation so saved photos don't come out rotated (it applies the rotation from the EXIF tag, then resets the tag so nothing double-rotates later), auto-appends .png when your filename has no extension, and refuses to overwrite: if the target already exists it silently becomes name_1.png, name_2.png, and so on.

    It also handles batches gracefully. Pass a list of images with a single filename and it auto-expands to name(1).png, name(2).png, ... - matching the pack's folder-batch siblings like LoadImageList for file-system-based pipelines.

    Inputs (all of them)

    • image - an IMAGE tensor; a list works for batch saves.
    • filename - your chosen base name.
    • filename_suffix - appended before the extension, e.g. _v2 in render_v2.png. Empty by default.
    • save_path - the folder to write into.

    There's no output; it's a terminal node, like the built-in SaveImage.

    Where it bites

    • save_path is not optional in practice. The field defaults to empty, and the node will try to create a directory from an empty string and fail. Point it at a real absolute path before you hit Queue.
    • No workflow metadata. Unlike ComfyUI's own SaveImage, this writes a plain PNG with PIL - your generation parameters and the workflow JSON don't get embedded. If you live the "drag the image back in to reconstruct the workflow" life, this breaks that chain. That's the trade you're making for exact filenames.
    • It writes anywhere you tell it to. That's the feature, but on a shared box be careful about where you point it.

    Install

    Same as every node in this pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Hasasasa/ComfyUI_DashuaiTools
    

    then restart ComfyUI - or just search "DashuaiTools" in ComfyUI Manager. No extra dependencies beyond what ComfyUI already ships (Pillow, numpy, torch).

    If your workflow hands files to a script, a dataset folder, or an API that expects a deterministic filename, this is the SaveImage you've been missing.

    CategoryImage/Save

    Inputs (4)

    NameTypeDefaultDescription
    imageIMAGE
    filenameSTRING
    filename_suffixSTRING
    save_pathSTRING

    Outputs (0)

    No outputs