Save Image Path (NH)
Dump images into a folder you choose, and get the paths back
- images
- filenames
- path
- saved_count
ComfyUI's built-in Save Image is fine until you need output in a specific folder, or a filename you can predict, or to know where the file actually landed. Save Image Path (NH) is the version that gives you all three. You give it an image batch and a folder, and it writes files there and hands back the path, the filenames, and a saved_count you can feed into other nodes.
The inputs that matter for most people: images (the IMAGE to save), folder_path, filename_prefix (default NH), and file_format (png, jpg, webp, or avif). Two conveniences are worth calling out. create_new_folder plus new_folder_name makes a subfolder for you - handy when every run should get its own dated directory instead of piling everything in one place. And number_suffix (on by default) auto-numbers files like NH0001.png, NH0002.png, and - the smart part - it scans the destination folder first and skips numbers that already exist, so you never overwrite a previous run. Turn it off and it writes a plain NH.png, overwriting as expected.
There's also preview_image, which writes a temp preview so the output shows up in the ComfyUI UI without you having to wire a separate Preview node, and dpi (default 300), which matters mainly if you're producing files headed for print - it's stamped into the file metadata, not a pixel-size change.
Where it shines
The filenames/path/saved_count outputs are the reason to use this over a plain save. Wire path into a filename-builder or a logging node, or route on saved_count to decide whether the batch wrote everything. The one thing to internalize: folder_path is interpreted relative to your ComfyUI output directory, not as an absolute system path (leave it blank and it saves to the output dir root). So folder_path: "batch/runs" lands at ComfyUI/output/batch/runs/. Absolute paths outside your output dir won't work the way you might expect - this is a "managed folders" tool, not a "write anywhere" one.
Install
It ships with NH-Nodes:
- ComfyUI Manager → search NH-Nodes → install → restart ComfyUI. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/jetthuangai/NH-Nodes.git
cd NH-Nodes
pip install -r requirements.txt
Then restart ComfyUI.
No models, no extra dependencies beyond the pack's standard set.
Common issues
The top gotcha is folder expectations: a "missing" file is almost always you looked in an absolute path while it saved under output/<folder_path>. The second is format quirks - avif and webp can be slow for big batches and aren't always readable by every viewer; stick with png unless you need the size savings. And if you expected per-file names you could control exactly, remember the numbering is automatic and sequential; number_suffix is your toggle, and prefix is your only naming lever. Note the saved files don't automatically embed the full workflow the way ComfyUI's default save does - if you need workflow-in-PNG, check the format support and your downstream tooling.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| folder_path | STRING | — | |
| create_new_folder | BOOLEAN | false | — |
| new_folder_name | STRING | — | |
| filename_prefix | STRING | NH | — |
| number_suffix | BOOLEAN | true | — |
| preview_image | BOOLEAN | false | — |
| file_format | COMBO | 4 options: png, jpg, webp, avif | |
| dpi | INT | 3001–2400 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| filenames | STRING | — |
| path | STRING | — |
| saved_count | INT | — |