KRuins - Save Image
Name Your Files After the Sampler, and Stop Eating the Good Run
- images
A folder with four hundred files called ComfyUI_00042_.png is a folder you never open again. You know the sampler and scheduler that produced an image matter, you know euler / normal and dpmpp_2m / karras are different pictures - but the default save node writes neither into the filename, and nobody types them by hand either.
KRuins - Save Image is a save node whose entire feature set is filename construction plus a folder picker. If that sounds slight, consider that the core SaveImage node's filename_prefix already is a small template language (%date:yyyy-MM-dd%, %NodeName.widget%) and almost nobody knows it. This node replaces the syntax with four dropdowns and four checkboxes, which is the honest reason people reach for it.
The mechanism
Every time it executes, it looks at the API-format prompt for the run - the flattened node dict the backend actually ran - and scans it for specific class types. It looks for KSampler, KSamplerAdvanced, or KSamplerSelect and pulls sampler_name; for KSampler, KSamplerAdvanced, or BasicScheduler and pulls scheduler. Sanitizes illegal filename characters out, joins the enabled parts with hyphens, and writes the PNG with the prompt and workflow metadata chunks that make drag-and-drop workflow recovery work.
That auto-detection is the clever bit and the fiddly bit at once. First match in the prompt dict wins - so on a graph with a base sampler and a hires-fix sampler, the name in your filename may describe the stage you didn't mean. The README admits this: "workflows with multiple sampler or scheduler nodes may require additional care."
Inputs that matter
images is the required IMAGE input. Everything else has a sensible default.
save_folder is the one field you'll actually touch. Its own tooltip says it: "Click to select an image save folder. Empty uses ComfyUI/output." Leave it empty and files land where you'd expect. Type or pick an absolute path (D:\renders\batch7) and it saves there, creating the folder if it doesn't exist. A relative path gets joined onto ComfyUI/output, and environment variables like %USERPROFILE% get expanded, which is handy on Windows.
Then the filename builder: custom_text (default "KRuins") plus part_1 through part_4, each with its own enable_N toggle. Each part is one of Custom, KSampler, Scheduler, Increment, or None. Defaults produce KRuins-euler-normal-0001.png. Rearrange them and you get normal-0001-KRuins-euler.png. The node draws a live preview so you can see the shape before you queue.
There are no outputs. This is a terminal node - if something downstream needs the image, branch a Preview Image or another node off the same source.
Installing it
Manager: search KRuins ComfyUI Node Suite. If it's not listed yet - and this pack is new enough that it may not be - clone:
cd ComfyUI/custom_nodes
git clone https://github.com/Rampart187/KRuins-ComfyUI-Node-Suite.git
Restart, and it's under the KRuins category. Dependencies are numpy and Pillow, both already present in any ComfyUI install. No models, no downloads.
Where people get burned
Saved files are missing from the UI preview. The node only reports saved files back to the frontend when the destination sits inside ComfyUI/output. Save to D:\renders and the file is written correctly, but the thumbnail block doesn't show - trust Explorer. Intentional, not a bug.
The folder picker does nothing. It shells out to a PowerShell FolderBrowserDialog, so it's Windows-only, and the README says other platforms are unvalidated. On Linux or macOS, type the path into the field by hand. On Windows, if it errors, it's usually because a picker dialog is already open somewhere (the server refuses concurrent dialogs) or ComfyUI is running somewhere it can't spawn a GUI process.
It refuses to overwrite, which can look like a bug. There's a collision loop - it counts up until the filename is free. With Increment enabled you get -0001, -0002. With Increment disabled and multiple images in one batch, the extras still get a -0002 suffix appended. And the live preview always shows 0001, so it can disagree with what's actually free on disk. The README flags that too.
A silent save failure on a custom folder. If ComfyUI's process can't write to that path - network share, another user's directory, a protected drive - the save errors out. Test with a plain folder under your user profile first if a custom path misbehaves.
The node count is zero after restart. The pack imports a V3-API video node at module load; on an older ComfyUI that import fails and takes all five nodes with it. Check the console for a comfy_api import error before re-cloning.
One last thing: PNG only. That's the right default - PNG is the format that carries the workflow metadata, so the file you can drag back onto the canvas is your real master copy.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| save_folder | STRING | Click to select an image save folder. Empty uses ComfyUI/output. | |
| custom_text | STRING | KRuins | — |
| part_1 | COMBO | Custom | 5 options: Custom, KSampler, Scheduler, Increment, None |
| enable_1 | BOOLEAN | true | — |
| part_2 | COMBO | KSampler | 5 options: Custom, KSampler, Scheduler, Increment, None |
| enable_2 | BOOLEAN | true | — |
| part_3 | COMBO | Scheduler | 5 options: Custom, KSampler, Scheduler, Increment, None |
| enable_3 | BOOLEAN | true | — |
| part_4 | COMBO | Increment | 5 options: Custom, KSampler, Scheduler, Increment, None |
| enable_4 | BOOLEAN | true | — |
Outputs (0)
No outputs