ComfyUI Node

Save Image

Save Image, the reason the rest of the pack exists

By teward·Created 2 years ago·Updated 2 years ago· 9
Save Image
  • images
    filename%time_%seed
    path
    extensionpng
    steps
    cfg
    model_name
    sampler_name
    scheduler
    positive_promptunknown
    negative_promptunknown
    seed_value0
    width1024
    height1024
    aspect_ratiounknown
    orientationunknown
    lossless_webptrue
    quality_jpeg_or_webp100
    counter0
    time_format%Y-%m-%d-%H%M%S
    include_metadatatrue
    save_prompt_with_metadatafalse
    save_extra_pnginfo_with_metadatatrue

    This is the node the rest of the pack is scaffolding for. HelperNodes_SaveImage saves your output - PNG, JPEG, or WebP - with the full generation settings burned into the file's metadata, so every image you make carries its own recipe. The catch is that it wants most of that recipe on wires, which is exactly what the other Helper-Nodes exist to provide.

    Stock ComfyUI's Save Image embeds the entire workflow JSON into the PNG. That's powerful - drag the image back in and the whole graph reconstructs - but it bloats files and costs time on every save. This node was written as a leaner alternative, explicitly inspired by the popular comfy-image-saver pack but cut down: by default it writes a compact, human-readable "parameters" block (A1111-style) instead of the full serialized workflow. Faster, smaller files, and the settings survive in a form you can actually read.

    How it works

    The save path is standard - convert the image tensor to a PIL image, write the file to ComfyUI/output, return the filename to the UI gallery. What's distinctive is the metadata. PNGs get a parameters text chunk with your prompts, steps, sampler, scheduler, CFG, seed, size, aspect ratio, orientation, model name, and the first 10 characters of the checkpoint's SHA-256 hash. JPEG and WebP get the same comment stuffed into an EXIF UserComment field, which is why the pack depends on piexif. If the %time/%seed filename template leaves a subfolder empty, it creates the directory for you.

    Here's the design quirk that ties the pack together: steps, cfg, model_name, sampler_name, and scheduler are required inputs that must be wired (forceInput). You can't leave them as widgets. So your graph genuinely looks like the pack's intended shape - HelperNodes_Steps into steps, CfgScale into cfg, CheckpointSelector into model_name, SamplerSelector into sampler_name, SchedulerSelector into scheduler. The value nodes aren't decoration; they're the plumbing this save node demands.

    Inputs that matter

    • images - required, wired from VAE Decode.
    • filename - default %time_%seed; tokens: %date, %time, %model, %seed, %counter.
    • path - optional subfolder under ComfyUI/output; created if missing.
    • extension - png, jpeg, or webp.
    • seed_value, width, height, aspect_ratio, orientation - optional, feed the metadata; the pack's other nodes provide these.
    • lossless_webp and quality_jpeg_or_webp - for the non-PNG formats.
    • include_metadata (default on), save_prompt_with_metadata (default off - this is what skips the full workflow JSON), save_extra_pnginfo_with_metadata (default on).

    The node has no outputs - it's an output node that reports saved files to the UI.

    The honest take

    For archiving: the default (no embedded workflow) is a real trade, and you should know what you're giving up. The "parameters" block records settings but not structure - drag one of these files back into ComfyUI and you won't get the graph back, unlike stock Save Image. If you share workflows by sharing images, flip save_prompt_with_metadata on for those files. If you just want a sane archive of what you generated, the default is genuinely better: leaner files, faster saves, and the settings you actually changed are right there in the metadata.

    Also worth knowing: the model hash is computed by streaming the whole checkpoint file on every save. It's memory-friendly but not free - on a big model over a slow disk you'll feel that extra second or two.

    Install

    Search ComfyUI-Helper-Nodes in ComfyUI Manager, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/teward/ComfyUI-Helper-Nodes
    

    Restart after. Requirements are numpy, pillow, piexif (EXIF metadata for JPEG/WebP) and whratio; Manager installs them. No models to download - this node reads what's already on your disk.

    Troubleshooting

    The most common stumble is wiring: because images, steps, cfg, model_name, sampler_name, and scheduler are forced wire inputs, a bare Save Image dropped into a fresh workflow won't run until you connect them all - wire from VAE Decode, HelperNodes_Steps, HelperNodes_CfgScale, CheckpointSelector, SamplerSelector, and SchedulerSelector. If files aren't where you expect, check the path field - a non-empty value writes to a subfolder under output. And if JPEG/WebP saving throws, piexif didn't install; pip install -r requirements.txt in the pack folder fixes it.

    CategoryComfyUI-Helper-Nodes

    Inputs (23)

    NameTypeDefaultDescription
    imagesIMAGE
    filenameSTRING%time_%seed
    pathSTRING
    extensionCOMBOpng3 options: png, jpeg, webp
    stepsINT
    cfgFLOAT
    model_nameCOMBO0 options:
    sampler_nameCOMBO34 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +28
    schedulerCOMBO9 options: normal, karras, exponential, sgm_uniform, simple, ddim_uniform, +3
    positive_promptoptSTRINGunknown
    negative_promptoptSTRINGunknown
    seed_valueoptINT00–18446744073709550000
    widthoptINT10248–16384
    heightoptINT10248–16384
    aspect_ratiooptSTRINGunknown
    orientationoptSTRINGunknown
    lossless_webpoptBOOLEANtrue
    quality_jpeg_or_webpoptINT1001–100
    counteroptINT00–18446744073709550000
    time_formatoptSTRING%Y-%m-%d-%H%M%S
    include_metadataoptBOOLEANtrue
    save_prompt_with_metadataoptBOOLEANfalse
    save_extra_pnginfo_with_metadataoptBOOLEANtrue

    Outputs (0)

    No outputs