🌸Flower File Name Combination
Timestamped, sanitized output filenames without the regex rabbit hole
- FullNameOut
- PathNameOut
- FileNameOut
ComfyUI's default SaveImage names files ComfyUI_00001_.png forever unless you babysit the filename_prefix widget. Flower File Name Combination is the pack's answer: a dedicated filename builder that assembles a full path and a filename from template tokens, stamps in the current date and time, and strips illegal characters so the save never fails on a ? or | that snuck into your prompt.
It won't make your files prettier to look at - it makes them findable. If you batch-generate for days, "which run produced this?" becomes a filename question, and this node bakes the answer in.
The tokens
Every format field is a template that accepts these tokens, all self-explanatory:
%MainFolderName,%SubFolderName,%FileName,%Suffix%DATE(formatted perDATE_format),%TIME(perTIME_format),%DATETIME(perDATETIME_format)
The defaults are sane: FullNameFormat gives you %MainFolderName/%DATE-%SubFolderName/%FileName-%DATETIME-%Suffix, which resolves to something like outputs/2026-08-28-RunA/job_20260828-143022_Take2. Date/time formats are standard strftime strings, so %Y-%m-%d becomes 2026-08-28 - change them if you want a different order or a custom clock format.
The three outputs
FullNameOut- the complete path+filename, backslashes normalized to forward slashes, illegal chars removed,//collapsed.PathNameOut- just the directory portion (keeps its trailing slash).FileNameOut- just the filename, no path separators, no illegal chars.
The division is the useful part: you can save with FullNameOut, or build a custom save path by wiring PathNameOut and FileNameOut separately into a save node that takes them as distinct inputs (the pack's own recommended pattern feeds the fileName output of Flower Audio Merge into the FileName slot here).
The checkbox that saves you typing
same_as_subfolder (default on) makes the filename follow the SubFolderName instead of the separate FileName field. If your convention is "one folder per project, file named after the project," you type the name once instead of twice. Leave it off when the file genuinely needs a different name than its folder.
How the timestamps stay fresh
The node's IS_CHANGED returns the current time, so ComfyUI re-runs it every execution and the date/time tokens update - which is what you want for a filename, but it does mean the node is always "dirty" and defeats caching for anything behind it. Keep it close to the save node and don't hang heavy computation downstream of it.
Install
Same pack, same drill:
cd ComfyUI/custom_nodes
git clone https://github.com/weichenglin0215/comfyui-flower-tools.git
Restart, or use ComfyUI Manager → search ComfyUI Flower Tools. No models, no downloads.
Gotchas
- Windows drive letters survive, everything else colons are removed -
C:is preserved, but a stray:elsewhere in the name is dropped. By design, but surprising on first use. - It's a string builder, not a saver - you still wire the outputs into an actual save node. It just makes the naming deterministic.
- The
noteparameter the source mentions is a leftover; the field isn't exposed in the current UI schema, so don't go hunting for a notes box that won't be there.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| MainFolderName | STRING | WildcardsTest/Z-Image-Turbo | — |
| SubFolderName | STRING | ArtStyle_Test | — |
| same_as_subfolder | BOOLEAN | true | — |
| FileName | STRING | ArtStyle_Test | — |
| Suffix | STRING | Take2 | — |
| DATE_format | STRING | %Y-%m-%d | — |
| TIME_format | STRING | %H-%M-%S | — |
| DATETIME_format | STRING | %Y%m%d-%H%M%S | — |
| FullNameFormat | STRING | %MainFolderName/%DATE-%SubFolderName/%FileName-%DATETIME-%Suffix | — |
| PathNameFormat | STRING | %MainFolderName/%DATE-%SubFolderName/ | — |
| FileNameFormat | STRING | %FileName-%DATETIME-%Suffix | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| FullNameOut | STRING | — |
| PathNameOut | STRING | — |
| FileNameOut | STRING | — |