LogicUtil_Save Image Custom Node
Save Image that tells you the filename it just wrote
- images
- STRING
ComfyUI's built-in SaveImage writes a PNG and moves on with its life. LogicUtil_Save Image Custom Node does the same thing - and then hands you back the filename as a STRING. That one extra output is the entire reason this node exists, and it quietly unlocks whole categories of workflow you can't build with the stock saver.
How it works
Three inputs: images (the IMAGE to save), filename_prefix (default ComfyUI, the same prefix scheme as the core node), and subfolder_dir (default empty) - a real input for dropping files into a subfolder of your output directory, which core ComfyUI makes awkward. It's an output node, so it marks the end of a branch, and it writes PNGs with the workflow JSON embedded as metadata, same as stock - meaning you can still drag the output back into ComfyUI to reconstruct the workflow. The return value is a STRING: the saved filename, with the .png extension stripped.
The filename output is where it gets interesting. Wire that string into a Merge String node and you can build a text file or a log entry that records what was produced this run - an output manifest. Pipe it into a display node to see the path on screen. Or feed it into a text saver so every generation leaves a "here's what I made and where" note next to the image. That's the kind of record-keeping the community keeps asking for, and the stock SaveImage can't give it to you because it doesn't output anything.
Mechanically it's a fork of ComfyUI's own SaveImage code: images are converted from the tensor, saved as PNG at compress_level 4, and the counter-based naming (filename_00001.png, filename_00002.png, ...) follows the same rules as core. Files land in your output folder, or in output/subfolder_dir if you set one. It's part of the LogicUtil family, a port of aria1th's ComfyUI-LogicUtils riding inside the JDCN pack from Daxton Caylor and Jerry Davos - which is a little odd, because this node is really a file I/O tool sitting in a logic pack, and it's one of the few JDCN nodes the README's file-handling theme actually covers in spirit.
Gotcha worth naming: if you need JPEG or a specific compression level, this node is PNG-only - it's a straight copy of the core PNG saver with the filename output bolted on. For anything else, use a dedicated image format node.
Install
Install is the standard JDCN routine: ComfyUI Manager → "Install Custom Node" → search JDCN → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/daxcay/ComfyUI-JDCN
cd ComfyUI-JDCN && pip install -r requirements.txt
Only piexif on the requirements list, no models to fetch. And when you expect a file in output/ and it's not there, check subfolder_dir - it's easy to type a folder name that doesn't exist yet, and the node writes wherever you pointed it.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| filename_prefix | STRING | ComfyUI | — |
| subfolder_dir | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |