JT Save Image to Path
Save images exactly where you want, with names you control
- image
- image
- save_folder
- save_filename
- save_count
JT Save Image to Path is the pack's heavyweight: a proper image saver that writes to any folder you name, with filename schemes, optional serial counters, and overwrite control. ComfyUI's built-in save node writes to its own output directory and names files by timestamp; this one writes where you say and names them how you say, which matters the moment you're producing batch deliverables.
Why you'd reach for it
Default ComfyUI output handling is fine for messing around and awful for anything systematic. If you're generating a product set, a style study, or a series you'll hand to someone, you want your files in a specific folder with predictable names - render_0001.jpg next to render_0002.jpg, not ComfyUI_00001_00001_ timestamps scattered in a shared output dir. This node also passes the image through untouched, so it can sit in the middle of a workflow instead of only at the end.
The inputs that matter
There are eight, but a beginner really sets these:
- image (IMAGE) - what to save.
- folder_path (STRING) - destination folder, created automatically if missing. Default is
/path; change it, see below. - filename (STRING) - base name, default
Image. - format (PNG / JPG) - default JPG. PNG embeds the full workflow + prompt as metadata (via the standard ComfyUI
prompt/workflowPNG chunks); JPG does not. If you're part of the "workflow included" culture and want to drag your own outputs back into ComfyUI, PNG is the only choice that preserves it. - use_counter (BOOLEAN) - turn on serial numbering.
- separator (none / hyphen / underscore) and counter_digits (1–5, default 4) - how the number joins the name and how wide it is.
- allow_overwrite (BOOLEAN) - default true. With a counter on, it just renumbers from 1 every run. Turn it off and it skips existing files and finds the first free number - which is the setting you want if you're appending to an existing set.
Outputs: image (the passthrough), save_folder (absolute path), save_filename (one filename per line, handy for logging), and save_count (how many were actually written this run).
How it works, briefly
Each image in the batch gets filename + separator + zero-padded counter. JPGs save at quality 95; PNGs save with compression deliberately set low (faster, bigger). If overwrite is off and a file exists, it's skipped and the counter advances until it finds an empty slot. There's a neat detail: you can't write to an empty filename (it validates and raises), and it refuses non-tensor input loudly rather than failing weirdly.
Gotchas
- The
/pathdefault is the #1 way people burn themselves. It's an absolute filesystem path. Run with the default and it will happily create/pathat your root and write there (or fail on permissions). Always set a real folder. - The path is literal - it does not resolve relative to ComfyUI's output directory. If you want something under your ComfyUI folder, type the whole path.
- JPG drops the workflow metadata. If you only keep JPGs, "drag the image back into ComfyUI to recover the workflow" stops working.
- Overwrite is on by default, and with a counter that means every run restarts at
_0001- turn onallow_overwrite: falsebefore running a batch you care about.
Installing it
Ships in the Comfyui_JTnodes pack:
cd ComfyUI/custom_nodes
git clone https://github.com/Jint8888/Comfyui_JTnodes
pip install "openai>=1.0.0" "openpyxl>=3.0.0"
or "Comfyui_JTnodes" in ComfyUI Manager. No requirements.txt in the repo, so run the pip install yourself even if Manager handles the clone - the pack imports openai at load and a missing dependency takes out every JT node at once. Restart, then find it under JT > JT/image. The README is Chinese, but the save logic above is straight from the source, and this is the node in the pack that's genuinely worth keeping around.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| folder_path | STRING | /path | — |
| filename | STRING | Image | — |
| format | COMBO | JPG | 2 options: PNG, JPG |
| use_counter | BOOLEAN | false | — |
| separator | COMBO | hyphen | 3 options: none, hyphen, underscore |
| counter_digits | INT | 41–5 | — |
| allow_overwrite | BOOLEAN | true | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| save_folder | STRING | — |
| save_filename | STRING | — |
| save_count | INT | — |