arkennemasis Run Folder (auto-numbered)
One numbered output folder per run, wired into every save node
- folder_path
- run_number
- save_prefix
You type a folder name. Each queued run resolves to the next free number - dataset_001, dataset_002 - and every save node wired to the output writes into that same folder. ArkRunFolder exists because "just put [time(%H-%M)] in the filename" doesn't work at scale: save nodes that support time tokens evaluate them at save time, so a graph writing 24 images over an hour scatters them across a half-dozen folders. This node resolves the path once per run, and every save reads the same string off one link.
For the arkennemasis character-LoRA workflow - one photo in, a 25-image captioned dataset out, ready for kohya or ai-toolkit - it's the difference between a training folder and a crime scene. One run, one folder, _001 through the batch.
How it works
The node scans the parent directory for existing <folder_name>_NNN siblings and picks the next free number, so a manual _009 correctly yields _010. IS_CHANGED returns NaN, meaning ComfyUI never serves the path from cache - each queued run recomputes it and gets a fresh folder. Crucially, only the save nodes downstream re-execute: upstream generators stay cached, so re-running doesn't re-bill a paid API node. That's the property that makes it safe to re-queue a run you want to re-save.
Inputs and outputs
parent_dir- where the run folders live. Relative paths resolve inside ComfyUI's output directory; blank = the output directory.folder_name- the base name, defaultdataset.padding- digits in the run number,3→_001.create_now(true) - make the folder immediately; off returns just the path and lets the save node create it.folder_path- the absolute path, if a node wants that.run_number- the_001number, if you want it in filenames or logs.save_prefix- this is the one SaveImage/SaveVideo actually want. It's the same folder expressed relative to ComfyUI's output dir with forward slashes, because those nodes build their own path fromfilename_prefixand mangle an absolute one. Wiresave_prefixinto them, notfolder_path.
Install and gotchas
Part of the arkennemasis pack:
cd ComfyUI/custom_nodes
git clone https://github.com/Hishamahmer/comfyui-arkennemasis
pip install -r ComfyUI/custom_nodes/comfyui-arkennemasis/requirements.txt
Restart, or install via ComfyUI Manager by repo URL.
The one trap is wiring folder_path into SaveImage/SaveVideo and wondering why the files land somewhere weird - those nodes need save_prefix. And remember the cache caveat that comes with every NaN node: the folder node itself always runs, so don't hang anything expensive behind it directly. Use it the way it's meant to be used, as the one link all your saves share, and re-queuing a run costs you a re-save, not a re-bill.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| parent_dir | STRING | Where the run folders live. Relative paths resolve inside ComfyUI's output directory. Blank = the output directory. | |
| folder_name | STRING | dataset | Base name you choose. Each run appends the next free number, so the same name never overwrites a previous run. |
| padding | INT | 31–9 | Digits in the run number: 3 -> _001. |
| create_now | BOOLEAN | true | Create the folder immediately. Off = only return the path and let the save node create it. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| folder_path | STRING | — |
| run_number | INT | — |
| save_prefix | STRING | — |