Output Filename (Soze)
Build a path and filename from reusable pieces
- Filename_&_Path
- Path
- Filename
- status
If you've ever hardcoded the same long save path into five different nodes and then had to go edit all five when the project name changed, this is the fix. Output Filename doesn't save anything itself - it just builds the path-and-filename string that every other file-writing node in this pack (Save Text File To Output, Append To Text File, Append To Video) wants as an input, out of small reusable pieces instead of one brittle hardcoded string.
How it works
It runs two separate joins. Up to five Path_Input slots get glued together with Path_Delimiter (default /) to build the directory. Up to five File_Input slots get glued together with File_Delimiter (default -) to build the actual filename. You don't have to fill all five of either - leave the ones you don't need blank. The two halves come back combined as Filename_&_Path, plus split out individually as Path and Filename if you only need one side.
The one non-obvious feature worth knowing about: the default for Path_Input_3 is %date:yyyy-MM-dd%. That's a template token, not a literal string - drop a %date:FORMAT% placeholder into any path or file segment and it resolves to today's date in that format at run time. That's how you get automatically dated output folders (./ProjectName/2026-08-04/GenerationType/...) without touching the workflow between runs.
The inputs and outputs that matter
Path_Delimiter/File_Delimiter(required, default/and-) - what glues each set of segments together.Path_Input_1–5(optional, defaults hint at the intended shape:.,ProjectName, the date token,GenerationType, blank) andFile_Input_1–5(optional, all blank by default) - fill in whichever segments you actually need.
Outputs: Filename_&_Path (the full combined string - this is what you wire into a save/append node), Path and Filename on their own if you need them separately, and status, which is worth routing to a text preview node while you're building your naming pattern so you can see the resolved string before anything gets written with it.
How to install it
ComfyUI Manager → search "ComfyUI_Soze" or "Quality of Life Nodes for ComfyUI" → install → restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/SozeInc/ComfyUI_Soze.git
pip install -r ComfyUI_Soze/requirements.txt
then restart. This particular node is pure string manipulation - no model files, no external service, nothing beyond the pack's base Python dependencies.
Common issues & troubleshooting
Empty segments still get joined. If you skip a middle Path_Input slot rather than a trailing one, you can end up with a doubled delimiter in the output (ProjectName//GenerationType instead of a clean path) - check status or Filename_&_Path before wiring it downstream, especially the first time you set up a naming pattern.
If you're relying on the %date:...% token, confirm the format string actually matches what you expect (yyyy-MM-dd gives you 2026-08-04; get the casing or separators wrong and you'll get a folder name that isn't a valid date at all, just a literal string with percent signs still in it).
And remember this node only builds the string - it doesn't touch the filesystem. If a downstream save fails, the bug is almost never here; it's in whether the target directory the string points at actually exists and is writable by whatever process ComfyUI is running as.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| Path_Delimiter | STRING | / | — |
| File_Delimiter | STRING | - | — |
| Path_Input_1opt | STRING | . | — |
| Path_Input_2opt | STRING | ProjectName | — |
| Path_Input_3opt | STRING | %date:yyyy-MM-dd% | — |
| Path_Input_4opt | STRING | GenerationType | — |
| Path_Input_5opt | STRING | — | |
| File_Input_1opt | STRING | — | |
| File_Input_2opt | STRING | — | |
| File_Input_3opt | STRING | — | |
| File_Input_4opt | STRING | — | |
| File_Input_5opt | STRING | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| Filename_&_Path | STRING | — |
| Path | STRING | — |
| Filename | STRING | — |
| status | STRING | — |