Folder Version Control (check / set)
Check or move the version counter — and the one thing it can't reset
- trigger
- status
- current_version
- next_version
What it is
This pack's Folder Version Incrementer writes every render into a fresh version folder - output/<label>/<date>/v001/…, then v002, and so on - by scanning the directory rather than keeping a counter file. Which is robust, but it means the only way to see or move the counter is to look at and write the filesystem. That's this node.
Two actions, one dropdown:
- check - reads the folder, reports how many versions exist and what the next one will be. Touches nothing.
- set - creates empty placeholder directories up to
value, so the next render comes out one after it. Use it to skip ahead, reserve a range, or stake out slots before a batch.
It replaces the pack's older separate Folder Version Check and Folder Version Set nodes, which shipped as two halves of the same job sharing six settings. Those are still registered (so old workflows load) but marked deprecated and hidden from the menu - if you see both in your node search results, use this one.
Inputs
- action -
checkorset. - label - the folder name under the output directory, e.g. a shot name or a project. Default
default. - value -
setonly. Createsv001 … v<value>, and the next run producesvalue + 1. Ignored when checking. - trigger - an any-type input. Wire any upstream output into it to control when this runs, which is the trick for sequencing it inside a graph instead of letting it fire whenever a node happens to be evaluated.
- prefix (default
v), padding (default 3), date_format (defaultMM-DD-YYYY; alsoDD-MM-YYYYandYYYY-MM-DD), and base_path (empty = ComfyUI's output directory) - the tooltips on each say the same thing: these must match the incrementer's. They're not cosmetic. A padding of 2 here against a padding of 3 there means this node is counting folders that the incrementer isn't writing into, and it will cheerfully report "0 versions" while your output directory fills up. - base_path - point both nodes at the same absolute directory if you're writing somewhere other than ComfyUI's output.
Outputs: status (a human-readable sentence - it reads like 'shot_a/09-23-2026': 4 version(s) exist - next will be v005.), current_version (int, 0 when there are none), next_version (int). The two numbers are the ones to wire if you want a graph to branch on how many takes already exist.
The catch worth internalising
There is no "reset" action, because there's no counter to reset. The version is derived from what's on disk, so the only way to go backwards is to delete or move the date folder. The node's own description says it: "To truly reset a label, delete its date folder from disk." That's not a missing feature - it's the whole design. A counter file is a single point of failure that gets out of sync with reality the moment someone clears their output folder; a directory scan is always true.
Two consequences people hit:
- Versions roll over at midnight. The date segment is part of the path, so yesterday's
v004doesn't stop today starting atv001. If you want one continuous numbering across days, that's a different node arrangement (or abase_pathand a label without the date). - Changing
date_formatorphans everything. Switch fromMM-DD-YYYYtoYYYY-MM-DDand the node starts counting in a folder that doesn't exist yet. The old versions are still on disk, just invisible to it now.
Install
ComfyUI Manager → search "CustomNodePacks", or:
cd ComfyUI/custom_nodes
git clone https://github.com/Code2Collapse/ComfyUI-CustomNodePacks
Restart ComfyUI. This node is pure filesystem work - no models, no VRAM, no OpenCV. The pack's required dependencies (opencv-python, scipy, safetensors) are all for the masking side; you don't need them for this, though a missing required package can stop the whole pack from importing. The README's warning applies as always: check pip list before installing requirements.txt, because it lists libraries ComfyUI already ships.
Common issues
- It reports 0 versions while files exist.
prefix,padding,date_format,labelorbase_pathdoesn't match the incrementer. Line them up; the tooltips exist because this is the failure mode. - The node seems to re-run (or not) at odd times.
IS_CHANGEDincludes a fingerprint of the version directory, so a new folder appearing does invalidate its cache - but if you're sequencing it deliberately, drive it from the trigger input instead of relying on evaluation order. setreserved more than you wanted. It creates directories; it doesn't delete them. Delete the placeholders - or the whole date folder - if you overshot.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| action | COMBO | check | check -> report how many versions exist and what comes next. Reads only; touches nothing. set -> create empty placeholder directories up to `value`, so the next run produces value+1. Use it to skip ahead or to reserve a range. |
| label | STRING | default | Folder name to inspect, under the output directory. |
| valueopt | INT | 11–999999 | 'set' only: create placeholders up to this version number. Ignored when checking. |
| triggeropt | * | Optional any-type trigger. Wire any upstream output here to control when this runs. | |
| prefixopt | STRING | v | Version prefix. Must match the incrementer's. |
| paddingopt | INT | 31–10 | Zero-pad width. Must match the incrementer's. |
| base_pathopt | STRING | Override base directory. Empty -> ComfyUI output dir. | |
| date_formatopt | COMBO | MM-DD-YYYY | Must match the incrementer's. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| status | STRING | Human-readable description of what was found or done. |
| current_version | INT | Highest version that exists (0 when there are none yet). |
| next_version | INT | What the next incrementer run will produce. |