Nodes/ComfyUI-LogicUtils/Save Image Custom Node
ComfyUI Node

Save Image Custom Node

Save Image Custom Node (SaveImageCustomNode) — ComfyUI-LogicUtils

By aria1th·Created 3 years ago·Updated 7 months ago· 119
Save Image Custom Node
  • images
  • STRING
filename_prefixComfyUI
subfolder_dir

Core ComfyUI's Save Image is a dead end, and that's usually fine. It writes the PNG, shows you a preview, and the chain stops there. But sometimes you need the save to be a step in the middle of something, not the end of it, and you need to know exactly where the file landed. That's what this node adds: it saves the image and hands you back the file path as a string you can wire onward.

That one difference is the reason to reach for it. If you're running ComfyUI headless or over the API and building some kind of automation, the path string is the thing you actually wanted: log it, feed it to a downstream node, drop it into a manifest, pass it to whatever runs after the generation. The stock Save Image can't give you that. It just draws a picture and goes quiet.

SaveImageCustomNode comes from ComfyUI-LogicUtils, the utility pack by aria1th (AngelBottomless of Illustrious XL fame). It's a personal toolkit more than a product, so the node is lean and undocumented, but this one is simple enough that there isn't much to explain.

Inputs and outputs

Three inputs. images is the IMAGE batch you want written. filename_prefix is a string that defaults to ComfyUI and prepends to each saved file, the same convention the core node uses. subfolder_dir is a string, empty by default, that lets you drop the output into a subfolder instead of straight into the flat output directory. That subfolder control is genuinely useful once you're generating enough that a single folder becomes a mess.

The single output is a STRING: the path of the saved file. It's also an output node, so like any save node it forces execution and won't get quietly cached away when you hit run.

Installing it

  • ComfyUI Manager: search "ComfyUI-LogicUtils" in Custom Nodes Manager, install, restart.
  • Manual: cd ComfyUI/custom_nodes && git clone https://github.com/aria1th/ComfyUI-LogicUtils, then restart.

Nothing to download beyond the code itself. No models, no chunky dependencies. The pack has an optional dependency auto-installer that's off unless you set COMFYUI_LOGICUTILS_AUTO_INSTALL=1 (or force it off with COMFYUI_LOGICUTILS_SKIP_INSTALL=1), and a save node won't need it.

Things to watch

The subfolder_dir path is relative to ComfyUI's output directory, so keep it a simple folder name rather than an absolute path unless you know where the process is rooted. If files aren't showing up where you expect, that's the first place to look.

The other thing is remembering that the STRING output is the whole point. If you're just saving a picture and want a preview, the core Save Image is fewer surprises. Reach for this one specifically when the path is a value the rest of your workflow needs to consume. And on a remote or serverless ComfyUI, "where it saved" means a path on that machine, not your local disk, so treat the returned string as a server-side location you then fetch or upload rather than a file already sitting on your desktop.

Categoryimage

Inputs (3)

NameTypeDefaultDescription
imagesIMAGE
filename_prefixSTRINGComfyUI
subfolder_dirSTRING

Outputs (1)

NameTypeDescription
STRINGSTRING