Scene Output Saver
Save batch results under their original filenames — before you lose your mind
- images
Here's the thing ComfyUI's built-in Save Image doesn't do: keep your filenames. Run a folder of 40 images through a processing pipeline and you get back ComfyUI_00001_, ComfyUI_00002_… which means you get to play "which one was WinterScene" afterward. Scene Output Saver exists to end that game. It's the sink node that pairs with Scene Prompt Viewer: feed it the IMAGE batch, wire in the filenames stream from the viewer, and every file comes out under its original name, sorted into a subfolder you define.
It's an output node - no sockets out, nothing to wire downstream of it. It's the last stop, and it's built for one specific pairing. If you're processing a single image, the README is blunt about it: the built-in Save Image with a manually typed filename is simpler. Reach for this when you're running a whole folder as a batch.
How it works
The contract is simple: the viewer gives you filenames as comma-joined file stems, and this node splits them back apart on the comma. Prompts arrive newline-joined and get split the same way, one per image. If save_prompt_txt is on (it is by default), each image gets a sibling .txt with its prompt - handy when the actual PNG metadata isn't going to survive whatever you do next.
Three inputs shape where things land:
output_root- defaults to ComfyUI's output folder; any absolute path works.folder_template- default{scene}/{date}_{version}. Supports{scene},{date},{version}.scene/version- your project name and this run's label. Bumpversionper run and each iteration gets its own fresh subfolder instead of overwriting the last one.
There's also filename_suffix (appended before the extension, e.g. _resize → WinterScene_resize.png) and image_format - png, jpg, or webp. The jpg_quality slider only applies to JPEG, by the way; the code ignores it for PNG and WebP.
The safety rail you'll actually hit
The node is paranoid in a way that will save you once: if the filenames count doesn't match the image count, it aborts with an error instead of misnaming your files. That almost always means a node between the viewer and this saver changed the batch size - an upscaler that split a batch, a mask node that dropped a frame. When you see that error, it's telling you the truth: don't put image-count-changing nodes between the two. Missing or blank filename slots fall back to image_00X.
One honest tradeoff: this saves via Pillow directly, so unlike Save Image it does not embed the workflow graph in the PNG. The workflow-in-the-image convention (see the image-io essay in our KB) doesn't apply here - your provenance lives in the optional .txt files instead. If you want drag-back-into-ComfyUI saves, this isn't that node.
Install
Same pack as the viewer - ComfyUI Manager, search ScenePromptViewer, or:
cd ComfyUI/custom_nodes
git clone https://github.com/yixuanzona/ComfyUI-ScenePromptViewer.git
Restart, and it's under image → utils. No extra dependencies, no models.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| output_root | STRING | /tmp/ComfyUI/output | — |
| folder_template | STRING | {scene}/{date}_{version} | — |
| scene | STRING | scene | — |
| version | STRING | v1 | — |
| filename_suffix | STRING | — | |
| save_prompt_txt | BOOLEAN | true | — |
| image_format | COMBO | png | 3 options: png, jpg, webp |
| jpg_quality | INT | 951–100 | — |
| promptsopt | STRING | — | |
| filenamesopt | STRING | — |
Outputs (0)
No outputs