Path Filename (Legacy)
The legacy filename builder that still works (if you need it)
- path
- filename
Path Filename is the original image path/filename builder from the AUN pack, and the first thing you need to know about it is in its own name in the node search: Legacy. It still works, it's kept around so old workflows don't break, but the pack's own documentation tells you to use Path Filename V2 for anything new. If you're reading this because you downloaded a workflow and it's full of these, here's how it thinks.
What it does
It builds two strings - path and filename - from a pile of toggles and free-text fields. The path is MainFolder + optional dated subfolder + up to two levels of custom subfolders. The filename is an assembly of prefixes, a base name, and whatever parameter tokens you switch on: %model_short%, %sampler_name%, %scheduler%, seed_%seed%, steps_%steps%, CFG_%cfg%, and %date%. Each toggle (Model, Sampler, Scheduler, Seed, Steps, CFG, Date) decides whether that token is included, and delimiter controls the separator between parts. There are also Labels (free text to stuff in the filename) and two prefixes/suffixes each.
The key design choice, and the reason it's legacy: it outputs path and filename as separate wires. The V2 family consolidated everything into one combined path_filename string because that turned out to be far less fiddly to route - one wire instead of two that have to stay in sync.
The inputs that matter
MainFolder- root output folder. Keep it short; Windows path-length limits bite here.Date_Subfolder- adds aYYYY-MM-DDsubfolder underMainFolder. Great for daily archives.Subfolder_A/Subfolder_B- your custom structure; add levels by putting/in the string.name- the base filename. Everything else hangs off this.- The token toggles - this is where the "auto filename" magic lives. If you want
my_photo_seed_1234_CFG_7_steps_30.png, switch onSeed,CFG,Steps.
It also takes an optional batch_size (used by savers to number a batch) and outputs only path and filename.
Legacy caveats
The name is honest: V2 exists because the separate-output design and placeholder formatting are harder to maintain. If a saved file shows up with a raw %model_short% instead of a model name, the placeholder wasn't resolved - that usually means the string went somewhere that doesn't know the token syntax. For new work, reach for AUN Path Filename V2 and pair it with AUN Save Image V2; V2 also gives you the manual/auto naming modes this one lacks (it has a plain name field only).
Install
Still part of the AUN ComfyUI Nodes pack:
cd ComfyUI/custom_nodes
git clone https://github.com/loz2754/AUN-ComfyUI-Nodes
or install "AUN ComfyUI Nodes" from ComfyUI Manager, then restart. Pack deps (piexif, opencv-python-headless, imageio-ffmpeg, requests) install via Manager or pip install -r custom_nodes/AUN-ComfyUI-Nodes/requirements.txt. No model downloads.
Bottom line: if an existing workflow uses this, leave it alone - it still produces fine filenames. If you're starting fresh, skip straight to V2. The legacy label isn't a judgment on quality; it's AUN telling you where the ecosystem is going.
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| MainFolder | STRING | Main | The root output folder. |
| Date_Subfolder | BOOLEAN | true | If on, creates a subfolder with the current date (YYYY-MM-DD). |
| Subfolder_A | STRING | First level of custom subfolders. Add more levels by adding a / between them. | |
| Subfolder_B | STRING | Second level of custom subfolders. | |
| name | STRING | Name | The base name for the file. |
| Date | BOOLEAN | true | Include the date placeholder (%date%) in the filename. |
| prefix_1 | STRING | First custom prefix for the filename. | |
| prefix_2 | STRING | Second custom prefix for the filename. | |
| Model | BOOLEAN | false | Include model placeholder (%model_short%) in the filename. |
| Sampler | BOOLEAN | true | Include sampler placeholder (%sampler_name%) in the filename. |
| Scheduler | BOOLEAN | true | Include scheduler placeholder (%scheduler%) in the filename. |
| Seed | BOOLEAN | true | Include the seed placeholder as seed_%seed% in the filename. |
| Steps | BOOLEAN | true | Include the steps placeholder as steps_%steps% in the filename. |
| CFG | BOOLEAN | true | Include the CFG placeholder as CFG_%cfg% in the filename. |
| Labels | STRING | Additional labels to include in the filename. | |
| suffix_1 | STRING | First custom suffix for the filename. | |
| suffix_2 | STRING | Second custom suffix for the filename. | |
| delimiter | STRING | The character used to separate parts of the filename. | |
| batch_sizeopt | INT | 11–1000 | The batch size for the output. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| path | STRING | — |
| filename | STRING | — |