Format Path
Dated subfolders for your save nodes, without the hassle
- formatted_path
Format Path is the smallest node in the Banana Studio pack, and possibly the most quietly useful. It expands date tokens inside a path template and hands you a ready-to-use path string. If you've ever wanted your Save Image node to write into 2026/08/28/ style subfolders instead of one flat output directory, this is a thirty-second fix.
The pattern it serves is one every ComfyUI user eventually hits: you generate a lot of images, and a flat output folder turns into an unusable pile within a week. Dated subfolders are the standard answer, and most people end up fumbling with save-node path syntax or a heavier file-naming node. Format Path does the one job - date-stamp a template - and nothing else.
How it works
You type a path_template, and every %date:...% token gets replaced with the current local time. Everything outside the tokens passes through untouched. The date format inside the %date: wrapper uses a Java-style pattern:
- Years:
yyyy,yy - Months:
MM,M - Days:
dd,d - Hours:
HH,H,hh,h(12-hour withh) - Minutes:
mm,m- seconds:ss,s - Milliseconds:
SSS- AM/PM:a
So this template:
%date:yyyy/MM/dd/ComfyUI%
becomes, on the day this is being written:
2026/08/28/ComfyUI
The README's examples run the same way: %date:yyyy-MM-dd% gives you 2026-08-28, and %date:yyyyMMdd-HHmmss% gives you a full timestamp like 20260828-143052 - useful when you want every save uniquely timestamped.
Using it
The single input is path_template, and the single output is formatted_path (STRING). Wire formatted_path into any save node's path or filename-prefix input - Save Image's filename_prefix is the classic target - and your outputs land in dated folders automatically. It also works fine as a label fragment for anything else that takes a string.
The honest limits
It's date-only. There's no %batch%, %seed%, or %width% style substitution here - if you need dynamic filenames beyond the clock, reach for a fuller file-naming node instead. And it doesn't create directories itself; it just produces the string. (In practice that's fine, because ComfyUI's save nodes create their own directory tree from the prefix.) The date is evaluated when the node runs, so a workflow queued at midnight will write into the new day's folder on that run - which is correct behavior, just worth knowing.
Install
It's part of tjcccc/comfyui_banana_studio, so the standard pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/tjcccc/comfyui_banana_studio.git
Restart ComfyUI (or search "Banana Studio" in ComfyUI Manager). No models, no pip dependencies, no API key - it's pure string formatting and runs fully offline.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| path_template | STRING | %date:yyyy-MM-dd%/ComfyUI | Path template to format. Supports date tokens such as %date:yyyy-MM-dd%. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| formatted_path | STRING | — |