Nodes/PortraitUtils/Simple Image Saver
ComfyUI Node

Simple Image Saver

Save PNGs and JPGs with metadata, suffixes, and no overwrites

By heyburns·Created 11 months ago·Updated 4 months ago· 1
Simple Image Saver
  • images
    output_path
    filenameComfyUI
    suffix
    file_formatPNG
    jpeg_quality95
    include_metadatatrue
    unique_filenamestrue

    ComfyUI's built-in saver is fine until you want a specific filename in a specific folder with metadata intact - then it's a fight. SimpleImageSaver is the pack's no-drama file writer: take images, give it a path and a name, and it writes PNG or JPG with the workflow metadata embedded, an optional suffix on the filename, and a counter so it never silently clobbers an existing file.

    The inputs are self-explanatory in a good way - most have tooltips from the author:

    • output_path - "Directory path (absolute or relative to ComfyUI/output)." Relative paths land in your output folder, so you can keep everything tidy.
    • filename - base name without extension (default ComfyUI).
    • suffix - "Optional suffix appended with a dash when provided." So filename: photo, suffix: restoredphoto-restored.png. Feed it from FilenameAppendSuffix or LoadImageCombined and your batch files get consistent, meaningful names.
    • file_format - PNG or JPG. jpeg_quality (default 95, "JPEG quality (0-100)") for the JPG side.
    • include_metadata - "Include workflow metadata (prompt + extras)" - on by default, so your saved PNG carries the prompt and graph info, which is the difference between a file you can reverse-engineer and a dead end.
    • unique_filenames - "Append a counter to avoid overwriting existing files" - on by default. This is the anti-footgun: rerun the graph, get photo-restored-1.png, not a silently destroyed previous run.

    It's an output node (is_output_node true), so it has no outputs and sits at the end of the graph - the standard terminal-node shape. Under the hood it writes real PNG metadata via PIL's PngInfo and, for JPEG, embeds a comment. The honest caveat: JPEG comments have a size cap, so if your metadata payload is huge it gets skipped with a warning in the log rather than silently truncated. If metadata fidelity matters, PNG is the format.

    Install

    Manager → search "PortraitUtils", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/heyburns/PortraitUtils
    

    Restart. PIL only, which the pack already requires.

    Common issues

    • "File already exists" behavior surprises you - unique_filenames defaults on; turn it off if you genuinely want to overwrite each run.
    • JPEG has no metadata - comments cap out. If the workflow prompt is huge, it's dropped with a warning. Use PNG for archival, JPG for quick exports.
    • Files landing somewhere unexpected - relative output_path resolves against ComfyUI/output. Use an absolute path if you want them elsewhere.
    • The (1) counters feel messy - that's unique_filenames doing its job. It's the "never lose a render" tradeoff, and it's usually worth it.

    It's the least glamorous node in the pack and possibly the most used. Every pipeline ends somewhere, and ending at a well-named, metadata-carrying file is a quality-of-life upgrade you feel on the first batch.

    CategoryPortraitUtils/IO

    Inputs (8)

    NameTypeDefaultDescription
    imagesIMAGE
    output_pathSTRINGDirectory path (absolute or relative to ComfyUI/output).
    filenameSTRINGComfyUIBase filename without extension.
    suffixSTRINGOptional suffix appended with a dash when provided.
    file_formatCOMBOPNG2 options: PNG, JPG
    jpeg_qualityINT950–100JPEG quality (0-100).
    include_metadataBOOLEANtrueInclude workflow metadata (prompt + extras).
    unique_filenamesBOOLEANtrueAppend a counter to avoid overwriting existing files.

    Outputs (0)

    No outputs