ComfyUI Node

Smart Save PNG

Save exactly where you want, and get your workflow baked in

By slvslvslv·Created about a year ago·Updated 24 days ago· 2
Smart Save PNG
  • images
  • IMAGE
filenameC:/output.png

Core ComfyUI already has a Save Image node, so why would you want Smart Save PNG? Because the built-in one writes to a fixed output folder with a prefix you then have to go hunting for. This node writes to exactly the absolute path you type - a folder you own, a filename you chose, no guessing where it landed. If you're scripting batch runs, dumping frames into a project folder, or feeding another tool that polls a specific directory, that's the whole difference.

How it works

It's dead simple under the hood: take the incoming IMAGE, convert it to a Pillow image, and save() it to the filename path. It creates the parent directory if it doesn't exist, so a path like /home/you/runs/2026/08/final.png just works the first time. And because it's a good ComfyUI citizen, it embeds the workflow JSON into the PNG metadata - the same "workflow included" behavior that's become standard practice in this ecosystem, meaning you can drag the saved file back onto the canvas and the whole graph reconstructs.

The other nice touch: it passes the images through unchanged as an output. So you can drop it into the middle of a graph as a "save a copy here" node and keep wiring downstream without breaking the chain.

Inputs and outputs

  • images - the IMAGE tensor to save.
  • filename - an absolute path, default C:/output.png. Notice that default: this node was written with Windows in mind, so on Linux or macOS you'll want to type your own path, e.g. /home/me/outputs/shot.png. It saves the first frame of the batch only - it's not a batch/sequence writer.

Output: IMAGE - the same tensor you fed in.

Installing it

It's part of the ComfyUI-SmartImageTools pack:

cd ComfyUI/custom_nodes
git clone https://github.com/slvslvslv/ComfyUI-SmartImageTools
pip install -r ComfyUI-SmartImageTools/requirements.txt

Then restart. Or use ComfyUI Manager and search "SmartImageTools". The heavy dependencies (scikit-learn, scikit-image, OpenCV, numba) are shared across the pack, and if the pack's other installs already succeeded, this node costs you nothing extra.

The honest caveats

First: the path is absolute. If you type a relative path or a directory that doesn't exist on the machine ComfyUI actually runs on (easy to do if you're building the workflow on one box and executing on another), you'll get a file-not-found crash at save time. Second, it overwrites silently - a deliberate feature if you're re-running, a footgun if you expected versioning. Third, the default C:/output.png on a non-Windows machine will just fail. Set the path yourself and it's a genuinely useful node that fills a real gap.

CategorySmartImageTools

Inputs (2)

NameTypeDefaultDescription
imagesIMAGE
filenameSTRINGC:/output.png

Outputs (1)

NameTypeDescription
IMAGEIMAGE