Save Image To Path π¦βπ₯
Save a PNG exactly where you want β no output-folder roulette
- images
ComfyUI's built-in Save Image node is great, except when it isn't - specifically when you need a file in a specific folder with a specific name, right now. That's what this node does: it takes a standard IMAGE, writes it as a PNG to whatever absolute path you give it, and tells you where it went.
Why you'd reach for it
The use cases are all about external tooling. You're building a workflow that drops renders into a project directory for an asset pipeline. You're writing a frame out to a shared folder so another app can pick it up. You want an image in D:\jobs\client-42\ named final_v3.png - not in output\ with a counter suffix you'll have to hunt down. Core ComfyUI can't do that cleanly; this node can.
How it works
The path handling is the useful part. A resolve_path() helper expands Windows-style environment variables like %USERPROFILE% and ~, converts to an absolute path, and the node then creates the folder if it doesn't exist. It saves your image as {filename}.png with PNG compression level 4 and prints the resulting path to the console (AG Save Image To Path: /path/to/file.png created.). No metadata embedding, no counter - just one file, exactly where you asked.
The inputs
Three of them, all required:
images- the image to save. (See the gotcha below about which one actually gets saved.)target_folder- the destination folder. Default is%USERPROFILE%, which expands to your home directory on Windows. The tooltip says "Target size for resizing" - that's a copy-paste leftover from some other node and it's a lie. This is a folder path, full stop.filename- name without extension;.pngis appended automatically. Default"output".
It's an output node with no return values.
Installing it
Standard ArchiGraph pack install - ComfyUI Manager, search "ArchiGraph", install, restart. By hand:
cd ComfyUI/custom_nodes
git clone https://github.com/vincentfs/ComfyUI-ArchiGraph
cd ComfyUI-ArchiGraph
pip install -r requirements.txt # or install.bat / install.sh
Requirements are opencv-python, opencv-contrib-python, matplotlib, and numba; nothing to download by hand, no keys.
Where people get burned
The big one: it only saves the first image in the batch. The code does images[0] and ignores the rest. Feed it a batch of eight frames and you get exactly one PNG, and nothing on the UI hints that this is happening. If you need every frame, you have to split the batch first and run this per image - or just use the normal Save Image node.
Second, there's no counter and no collision handling. Run it twice with the same filename and the second run silently overwrites the first. That's occasionally what you want (idempotent export), but if you're generating a series, name your files with a timestamp or index or you'll lose work. Finally, folder creation is best-effort - if the path is invalid (say, a nonexistent drive letter), it prints a failure line and returns without saving. Watch the console for the created. confirmation before you trust it.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | The images to save. | |
| target_folder | STRING | %USERPROFILE% | Target size for resizing. |
| filename | STRING | output | Filename without extension (extension .png will be added automatically). |
Outputs (0)
No outputs