FL Save Images
Custom folders, templated filenames, no overwrites
- images
- STRING
ComfyUI's built-in Save Image node is fine right up until you want any control over where and how things land on disk. Then it's a straitjacket - everything goes to the output folder with a prefix and a number, take it or leave it. FL_SaveImages is the "leave it" option: custom base directory, a templated filename, an auto-incrementing index so you never clobber a previous run, and optional metadata written alongside. If you're organizing a lot of output - a dataset, a client's batches, frames by scene - this is the node that keeps it tidy.
How it works
You point it at a base_directory, optionally describe a folder_structure, give it a file_name_template with an {index} placeholder, and it writes each incoming image out, bumping the index each time so filenames stay unique. Turn auto_increment on (it's the default) and it hunts for the next free number instead of overwriting - so re-running a workflow appends rather than destroys. You can also pass a metadata string to save as a sidecar text file next to each image, which is handy when you want the prompt or settings travelling with the picture.
It's an output node, so it terminates a branch, but it also returns the path it wrote to as a STRING if you want to chain further logic off "where did that go."
The inputs that matter
images- the batch to save.base_directory- the root folder. Default is./output.file_name_template- the filename pattern, e.g.image_{index}.png. The{index}token is what gets incremented.start_index- where the numbering begins.auto_increment- keep this on to avoid overwriting existing files; it finds the next open index.folder_structure- a JSON list describing subfolders, if you want output organized into a directory tree rather than a flat folder.metadata(optional) - text saved as a sidecar file per image.
Output is a STRING with the save path.
Installing it
Part of the Fill-Nodes pack. ComfyUI Manager: search ComfyUI_Fill-Nodes, install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/filliptm/ComfyUI_Fill-Nodes
then restart. The pack drops a "Machine Delusions" banner in the console at startup - cosmetic.
Where people get tripped up
- On cloud or serverless ComfyUI, arbitrary local paths don't persist. This is the one to watch. A hosted/serverless runner (like running on comfy.icu) collects your outputs from the platform's own output location and stores them - it isn't handing you the container's filesystem. Writing to some custom
base_directorymay vanish when the worker spins down. If you're on a managed runner, save to the expected output path and let the platform capture it; the fancy folder trees are a local-machine luxury. {index}is the token that matters. Forget it in your template and every image tries to write to the same name -auto_incrementwill still bump, but your filenames won't reflect it the way you expect. Keep{index}in the pattern.folder_structureis JSON, not a path string. It expects a list format; a rawfoo/barstring won't do what you think. If the subfolders aren't appearing, check that.- It's a terminal node. It ends its branch. If you need the images and to keep processing them, tee the batch before this node rather than expecting an image output - this one only returns the path.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| base_directory | STRING | ./output | — |
| folder_structure | STRING | [] | — |
| file_name_template | STRING | image_{index}.png | — |
| start_index | INT | 10–1000000 | — |
| auto_increment | BOOLEAN | true | — |
| metadataopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |