Image Save To Path
Write an image to an exact file path you choose
- image
ComfyUI's built-in Save Image node is opinionated: it drops files in the output folder with an auto-numbered ComfyUI_00001_.png name and you don't get much say. JWImageSaveToPath ignores all that and writes the image to the exact path you give it - folder, filename, extension, your call. When you need output to land in a specific place with a specific name, this is the node.
The typical reasons: you're feeding a downstream tool that watches a fixed path, you want a predictable filename instead of a counter, or you're building the path dynamically (a timestamp, a concatenated name) and want the file to match. It's a control-over-output node, plain and simple.
How it works
It takes the image and writes it to disk at path, on the machine running ComfyUI. The file extension in the path decides the format (.png, .jpg, etc.). It's an output node - the end of a branch - so it produces no wire out; running the graph is what triggers the save.
The inputs and outputs that matter
path(STRING) - the full destination path, default./image.png. Wire in a built string (JWStringConcat + JWDatetimeString is a common combo) to generate names dynamically.image(IMAGE) - the image to save.overwrite(enum:true/false, defaulttrue) - whether to clobber an existing file at that path. Withtrue, saving to the same path repeatedly overwrites. Setfalseto protect existing files.- No output wire - it's a terminal save node.
How to install it
Part of jamesWalker55/comfyui-various, a pack of small utility nodes.
- ComfyUI Manager: search "Various ComfyUI Nodes by Type", install, restart. Red node in a downloaded workflow? Install Missing Custom Nodes.
- Manually:
Restart afterward. No models, no dependencies.cd ComfyUI/custom_nodes git clone https://github.com/jamesWalker55/comfyui-various
Under the jamesWalker55 category after restart.
Common issues
- The file overwrites itself every run. With
overwriteontrueand a fixed path, that's expected - each run replaces the last. For unique files, build a changing path: pipe a JWDatetimeString timestamp or a JWIntegerToString counter through JWStringConcat intopath. Or setoverwritetofalse, though then a repeated run may error or skip rather than saving. - Where did the file go? (cloud/serverless gotcha.) The path is on the server's filesystem, and a relative
./image.pngresolves against ComfyUI's working directory - not your computer. On a hosted or serverless setup, local disk is often ephemeral and wiped when the worker spins down, so a file written to a local path can vanish. If you're running remotely and need the result back, use the standard Save Image node (whose output the platform actually collects and serves) rather than writing to an arbitrary local path. - Permission denied / folder missing. ComfyUI needs write access and the target directory generally has to exist. Point it somewhere writable and create the folder first if needed.
- Node is red / missing. The pack isn't installed. Install via Manager or clone the repo, then restart.
Great node for local pipelines where you own the disk. On a shared host, know that "save to path" means the host's path, and plan accordingly.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| path | STRING | ./image.png | — |
| image | IMAGE | — | |
| overwrite | COMBO | true | 2 options: false, true |
Outputs (0)
No outputs