Save Image With Absolute Filename (Soze)
Full control over the saved filename
- images
Stock ComfyUI's Save Image node names your files with an auto-incrementing counter - ComfyUI_00001_.png, ComfyUI_00002_.png, and so on - which is fine until you need a predictable, deterministic filename for something outside the graph to pick up. This node saves to your ComfyUI output directory the same way, but gives you full control over the exact filename via a token-substitution syntax instead of the automatic counter.
How it works
filename_prefix supports formatting tokens: %date:yyyy-MM-dd% pulls today's date in that format, and %NodeTitle.field% pulls a live value from another node in your graph - the schema's own example is %Empty Latent Image.width%, grabbing the width value straight off your latent node. That means you can auto-tag saved files with the resolution, seed, or any other value used to generate them, without manually updating a text field every time you change a setting.
The inputs that matter
- images - the images to save.
- filename_prefix - default
"ComfyUI", but the real feature is the token syntax described above. Build it out to get a filename you can predict and match from outside ComfyUI - useful in batch pipelines where something downstream needs to find the file by name.
There are no outputs - like ComfyUI's stock Save Image node, this terminates that branch of the graph. If you're expecting to chain something off it, you can't; wire a second copy of your image tensor separately if you need to both save and keep processing.
Why the deterministic filename matters
Stock ComfyUI's auto-incrementing counter is fine for interactive use - you're looking at the gallery, you don't care that file 47 is called ComfyUI_00047_.png. It falls apart the moment something else needs to find a specific output by name: a batch pipeline that processed prompt_003.txt and needs its result saved as something recognizably tied back to prompt_003, or a script polling the output folder for a file it can identify without guessing at a counter value. Build filename_prefix out of tokens pulled from the nodes actually driving that run - the source filename from a folder loader, cleaned up first with this pack's own Special Character Replacer if the text is unpredictable - and the output name becomes something you can compute and look for, not something you have to discover after the fact.
Installing it
ComfyUI Manager: search ComfyUI_Soze. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/SozeInc/ComfyUI_Soze.git, pip install -r ComfyUI_Soze/requirements.txt, restart. No models, no API keys - it writes files, nothing more.
Common issues
The token syntax is picky about exact matches: %NodeTitle.field% has to match the other node's title and field name exactly. Rename a node in your graph and any %OldTitle.field% reference in your filename_prefix silently stops resolving - it won't error loudly, it'll just not substitute, so if your saved filenames suddenly have a literal %...% string sitting in them, that's the first thing to check.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | The images to save. | |
| filename_prefix | STRING | ComfyUI | The prefix for the file to save. This may include formatting information such as %date:yyyy-MM-dd% or %Empty Latent Image.width% to include values from nodes. |
Outputs (0)
No outputs