APZmedia Generate File Path
Build a folder path ComfyUI can actually save into, without guessing slashes
- generated_path
The biggest complaint about ComfyUI output is that everything lands in one folder with numbered names. Save Image does let you type a folder into filename_prefix - outputs/myproject/shot01/ - but typing it by hand per workflow is exactly the kind of thing you'll screw up at the end of a long session, and hardcoding paths into shared workflows breaks them for everyone who downloads them. APZmedia Generate File Path is the APZmedia Naming Tools answer: assemble the folder path from components, toggle which ones are in, and let the node sort out the slashes.
It's a sibling of the Standard Filename Builder, but for directories instead of file names. You get five text fields - root_folder, project_name, episode_name, shot_name, pass_name - each with an Include/Exclude dropdown, plus the one control this node has that the filename builders don't: slash_type, with Forward (/), Backslash (\), and Auto. The output is a single STRING called generated_path.
How it works: the node joins only the included, non-empty components, then normalizes the separators according to your slash_type choice. Two things are worth knowing from the source. First, empty fields are skipped the same way as the filename builders, so you never get // where a component was left blank. Second, the Auto setting effectively produces forward slashes on every platform - useful because ComfyUI's Save Image treats forward slashes as subfolder separators cross-platform. If you genuinely need backslashes (say, you're handing the path to something Windows-only downstream), pick Backslash explicitly instead of assuming Auto will do it.
The natural wiring: generated_path → the filename_prefix of Save Image, which will create the folders on write. Or feed it into a node that needs a full directory before you append a filename built by one of the naming nodes. Because every segment is free text, you can drive them from anything - a project name widget, a shot from APZmediaCycleInt, a version you bump per run - and your outputs start organizing themselves into a tree instead of a single dumping ground.
Same caveats as the rest of the pack: this node assembles paths, it doesn't sanitize them. Spaces and odd characters in components go straight through, so if a component could contain something a filesystem objects to, run the pieces through the Clean File Name Node first (and note that the slash normalization only happens between components - a slash typed inside a component will survive, so keep components clean).
Install
ComfyUI Manager → search "APZmedia Naming Tools". Or:
cd ComfyUI/custom_nodes
git clone https://github.com/APZmedia/ComfyUI-APZmedia-cleanName-from-string
cd ComfyUI-APZmedia-cleanName-from-string
pip install -e .
Restart ComfyUI and the node appears under APZmedia. No models, no downloads, single tiny dependency (unidecode) that this node barely uses. This is the one I reach for when a workflow is about to start generating hundreds of files I need to find again.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| root_folder | STRING | — | |
| project_name | STRING | — | |
| episode_name | STRING | — | |
| shot_name | STRING | — | |
| pass_name | STRING | — | |
| slash_type | COMBO | 3 options: Forward (/), Backslash (\), Auto | |
| toggle_root_folder | COMBO | Include | 2 options: Include, Exclude |
| toggle_project_name | COMBO | Include | 2 options: Include, Exclude |
| toggle_episode_name | COMBO | Include | 2 options: Include, Exclude |
| toggle_shot_name | COMBO | Include | 2 options: Include, Exclude |
| toggle_pass_name | COMBO | Include | 2 options: Include, Exclude |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| generated_path | STRING | — |