🍒Save_Image / 判断路径保存
ComfyUI's save node, but the files land where you actually point it
- images
ComfyUI's built-in Save Image is fine, right up until you want your renders in a folder you chose instead of an auto-named subdirectory under output/. Save_Image is the KimNodes answer to that: you type a path, it makes the folder if it doesn't exist, and it keeps counting files so you don't get name collisions.
It's a small, dumb, genuinely useful utility - the kind of node you forget is there until you're building a batch pipeline that needs to drop images into a specific directory that another script watches. It's filed under the pack's Text_Tools category, which tells you the author thinks of it as a plumbing node rather than a headline feature. Fair.
How it works
You feed it images and a file_path string. If the path ends in an extension (like .png), it splits that off and treats the rest as the folder - a small convenience that lets you paste a full filename and have it ignored. It creates the directory if missing, then counts the files already in it so the numbering picks up where the folder left off (a nice touch that stops it from clobbering earlier runs). Each image is saved as name_00000_.png-style PNGs, with the workflow prompt and extra_pnginfo embedded as PNG metadata just like the stock node - so drag-the-image-back-into-ComfyUI still reconstructs your workflow.
There's also a collision fallback: if the computed filename already exists, it appends a random 8-character string rather than overwriting. So worst case you get a slightly ugly filename, never a silently replaced file.
The inputs that matter
images- the IMAGE tensor(s) to save.file_path- the directory you want, e.g.output/my_projectorD:/renders/project_a. Relative paths resolve against your ComfyUI working directory, sooutput/...behaves like you'd expect.
There are no outputs - this is an output node, and it's the end of the line in your workflow.
Installation
Standard KimNodes pack install - ComfyUI Manager → search "ComfyUI_KimNodes" → Install → Restart, or:
cd ComfyUI/custom_nodes && git clone https://github.com/wjl0313/ComfyUI_KimNodes
No extra dependencies beyond what ComfyUI already ships (PIL, numpy, folder_paths).
Common issues
- "Where did my file go?" - the path is relative to where ComfyUI runs from, not the
outputfolder. If you typeoutput/xand can't find it, check whether you meant an absolute path. - Empty
file_path- the node falls back to the default output directory, so it won't error out; you'll just wonder why it ignored your input. - Files keep appearing in the default output folder - same root cause. This node respects exactly the string you give it, no more.
Honestly, if you're happy with the stock Save Image, you don't need this. Reach for it the day you need files in a scripted location with collision-safe naming, and it'll quietly save your batch.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| file_path | STRING | — |
Outputs (0)
No outputs