ComfyUI Node

Image Result

Preview + Save in one node, with a kill-switch for actually writing the file

By AstroCorp·Created about a year ago·Updated about 9 hours ago· 1
Image Result
  • image
  • images
savefalse
filename_prefixComfyUI

Every ComfyUI workflow ends the same way: a Preview Image node so you can actually see the result, and a Save Image node so you keep the good ones. Image Result merges those two into a single node with a save toggle - always previews, only writes to disk when you say so. It's the kind of small workflow-tidying node that earns its place once you've got a dozen branches ending in the same output pile.

How it works

The node subclasses ComfyUI's own SaveImage, which tells you it's built on solid stock code rather than reimplementing anything. On every run it calls PreviewImage.save_images() first, so you always get the in-graph preview. Only if the save boolean is true does it call the parent's save routine and write the PNG to your ComfyUI output directory. The hidden prompt and extra_pnginfo inputs behave exactly like stock Save Image - your workflow metadata gets embedded in the saved PNG, which is what lets other tools reconstruct the graph from the file.

The inputs that matter

  • image (IMAGE) - wire your decoded result here. It also passes through on the output, so you can chain this node mid-graph if you want.
  • save (BOOLEAN, default false) - the whole point. Leave it off while you iterate so your output folder doesn't drown in near-misses; flip it on for the keeper.
  • filename_prefix (STRING, default "ComfyUI") - files land in output/<prefix>_NNNNN_....png. Give it a real name once you're saving keepers.

The output is images (IMAGE), a passthrough of what you fed in. Since this is an output node, it can legitimately end a branch.

Why you'd reach for it

If you're the type who tweaks a prompt forty times and saves every attempt "just in case", you know the pain of a 40-file output folder. Image Result's real value is the workflow discipline it enables: preview always, save only the ones that clear the bar. It also kills the recurring wire-tangle of Preview-and-Save pairs, which genuinely matters once your graph has more than one output branch.

How to install it

Via ComfyUI Manager, search "ComfyUI AstroCorp Nodes" and install, then restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/AstroCorp/ComfyUI-AstroCorp-Nodes

Restart ComfyUI and it's under "🚀🌍 AstroCorp 🌍🚀". No model files, no heavy dependencies - the pack declares zero Python deps (requirements.txt's tensorrt line only serves the pack's ONNX upscaler nodes, which you're not touching here).

Common issues

The one trap is the default: save is false. You run a batch, the previews look great, and nothing appears in output. That's not a bug - it's the feature. If you expected files and got none, check the toggle first, then your filename_prefix.

Second, because preview always runs, this node does a little more work per execution than a bare Save Image. On a heavy end-of-graph decode that's nothing; just don't scatter a dozen of them through a graph and expect free performance. For a small personal pack with no real community track record, the code is refreshingly boring - it wraps stock nodes and stays out of the way, which is precisely what you want from a QoL node.

Category🚀🌍 AstroCorp 🌍🚀

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
saveBOOLEANfalse
filename_prefixSTRINGComfyUI

Outputs (1)

NameTypeDescription
imagesIMAGE