ComfyUI Node

IO_save_image

A save node with real control over the filename

By cardenluo·Created 2 years ago·Updated 18 days ago· 309
IO_save_image
  • image
  • filename
  • file_path
file_format
output_path./output/Apt
filename_midApt
file_names
naming_format命名+序号
number_digits5
save_workflow_as_jsonfalse

The stock ComfyUI save node gives you a prefix and a counter - fine most of the time, limiting the moment you actually care about naming. IO_save_image is this pack's fuller-featured save node: pick your output folder, control whether the counter goes before or after your name, set how many digits it pads to, hand it exact filenames if you already have them, and optionally drop the workflow JSON alongside the image for reproducibility.

How it works

Point output_path at a folder (default ./output/Apt) - it gets created automatically if it doesn't exist. filename_mid is the name fragment that goes into the auto-generated filename, and naming_format decides the shape: name-then-number, number-then-name, name only, or number only. number_digits (1–10, default 5) pads the counter with zeros. If you'd rather name things explicitly, file_names accepts one filename or several (newline-separated, with support for a List: prefix and - bullet format per the README) - when it's provided, it takes priority over the naming-rule-generated name entirely. And per the node's own documented behavior: if you don't wire in an image, it simply doesn't save anything - no error, it's a deliberate no-op, which makes it safe to leave sitting at the end of an optional branch.

Inputs and outputs

  • image - what gets saved. No image, no save.
  • file_format - png, webp, jpg, or tif.
  • output_path - destination folder, auto-created if missing.
  • filename_mid, naming_format, number_digits - control the auto-generated name and its counter.
  • file_names - override with explicit filenames instead.
  • save_workflow_as_json - also write the workflow graph next to the image, off by default.

Two outputs: filename and file_path (both STRING), so you can chain the exact name the node ended up using into something else - a log node, a status display, or another save-adjacent step.

How to install it

ComfyUI Manager → search ComfyUI-Apt_Preset, install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git

then run install.bat for dependencies (Windows-only - on Linux/macOS run its pip install lines by hand) and restart ComfyUI.

Common issues & troubleshooting

Nothing saved and no error appeared. That's expected if image isn't connected - this node stays silent rather than throwing, by design. Check the wire first before assuming something's broken.

Want a fixed overwrite-the-same-file behavior instead? That's not what this node does - it's built around auto-incrementing names and explicit filename lists. This pack ships a separate node, IO_ImageSaveOverwrite, specifically for the "always write to the same path" case; reach for that one instead.

number_digits doesn't seem to do anything. It's explicitly documented as being ignored when naming_format doesn't include a number component at all - if you've set naming_format to name-only, the digit-padding setting has nothing to apply to.

IMPORT FAILED on startup. This pack has at least one reported import failure in the wild on a stock install, usually because the install.bat dependency step got skipped - which has to be run manually off Windows. Check the console for the actual missing package before reinstalling.

CategoryApt_Preset/IO_Port

Inputs (8)

NameTypeDefaultDescription
imageoptIMAGE
file_formatoptCOMBO4 options: png, webp, jpg, tif
output_pathoptSTRING./output/Apt
filename_midoptSTRINGApt
file_namesoptSTRING
naming_formatoptCOMBO命名+序号4 options: 序号, 命名+序号, 序号+命名, 命名
number_digitsoptINT51–10
save_workflow_as_jsonoptBOOLEANfalse

Outputs (2)

NameTypeDescription
filenameSTRING
file_pathSTRING