Output Dir By Model Name (watdafox)
Never manually type an output filename again — build it from the model name
- str_model_name
- full_path
- output_dir
- file_name
Output Dir By Model Name is a path builder: you give it a model name (or any path-ish string), it generates an output_dir, a file_name, and a combined full_path - timestamped and organized by default, so you can wire them straight into a Save Image-style node that accepts a filename. If you generate a lot and your output folder is a wasteland of ComfyUI_00001_.png, this is the node that fixes your life.
The default behavior tells you what it's for: take models/checkpoints/someModel.safetensors, and it produces an output dir like someModel/2026-08-16/ and a filename stamped with the exact time (2026-08-16-123456). Every model gets its own dated folder. That's the whole organizing principle, and it's a good one.
How it works
The path logic is all toggles. use_first_dir takes the first path component of the model string (models if you pasted a full path, the model filename's folder otherwise). use_ckpt_name uses the file stem (no extension) as the model folder name. use_time_folder adds a YYYY-MM-DD directory; use_time_file_name adds a full timestamp to the filename. folder_prefix, extra_filename, and extra_number (only appended when > -1) let you tag runs - e.g. a prompt variant name or a batch counter. If you end up with an empty filename, it falls back to a random integer so you never collide. The node always re-executes (it's marked as an output node and reports "always changed"), because timestamps are the point.
It also pushes the generated values back into its own full_path / output_dir / file_name widgets via the pack's web extension, so what you see in the node is what you'd save.
The inputs and outputs
model_name- the string you're building from. Paste the checkpoint path/name.- The four
use_*toggles - this is where the layout is decided. Flipuse_time_folderoff and you get one folder per model; flipuse_ckpt_nameoff and the model name disappears from the path. - Outputs
str_model_name(echo of the input),full_path,output_dir,file_name- all STRING.
Category: watdafox/string. Note the (English) display name is "Output Dir By Model Name"; the class name has the classic "Ouput" typo.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/OhSeongHyeon/comfyui-watdafox-nodes.git
Restart ComfyUI, or ComfyUI Manager → "comfyui-watdafox-nodes". No pip dependencies, no model files.
What's worth knowing
If you want the same path logic bundled into a checkpoint loader (so the model loads and the path builds from it), this pack's Checkpoint Loader Advanced does both - its enable_make_path toggle controls the same path machinery. And if your Save node expects a full path rather than a filename, feed it full_path and test once before you commit, because save-node filename conventions vary between packs.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | STRING | — | |
| folder_prefix | STRING | — | |
| extra_filename | STRING | — | |
| extra_number | INT | -1-1–18446744073709550000 | — |
| use_first_dir | BOOLEAN | true | — |
| use_ckpt_name | BOOLEAN | true | — |
| use_time_folder | BOOLEAN | true | — |
| use_time_file_name | BOOLEAN | true | — |
| full_path | STRING | — | |
| output_dir | STRING | — | |
| file_name | STRING | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| str_model_name | STRING | — |
| full_path | STRING | — |
| output_dir | STRING | — |
| file_name | STRING | — |