Nodes/ComfyUI-CustomNodePacks/Folder Version Set
ComfyUI Node

Folder Version Set

Folder Version Set

By Code2Collapse·Created 6 months ago·Updated a day ago· 52
Folder Version Set
  • trigger
  • status
  • next_version
labeldefault
value1
prefixv
padding3
base_path
date_formatMM-DD-YYYY

Folder Version Set is the manual override for the version system in ComfyUI-CustomNodePacks. The pack's Folder Version Incrementer finds the next free version by scanning the filesystem; this node instead claims versions ahead of time by creating placeholder directories. Set it to value=10 and it creates v001 through v010 under output/<label>/<date>/, so the next incrementer run starts at v011.

When would you actually want that? Two situations. First, reserving a known version range - you want a shot to be v100 for continuity with an external numbering scheme, and rather than generating 99 real files to get there, you reserve the slots. Second, skipping ahead deliberately when a version number is known-bad or taken by an unrelated process. It's the node you almost never need - until you do, and then there's no other way to do it.

How it works

The mechanics are as plain as the node: for i in 1 to value, it creates <base>/<label>/<MM-DD-YYYY>/vXXX/ as an empty directory (with the prefix and padding you specify, default v + 3 digits). Everything already exists is left alone. It returns:

  • status (STRING) - "Reserved v001–v010 for 'shot/08-25-2026'. Next = v011"
  • next_version (INT) - value + 1, i.e. exactly what the next incrementer run will produce.

The inputs worth noting: label and value are required; prefix, padding, base_path, and date_format are optional but must match what your FolderIncrementer is using, or you'll reserve a namespace the incrementer never looks at. There's also a trigger wildcard input so you can control when the reservation happens in the graph's execution order.

The inputs and outputs that matter

  • label - which shot/folder namespace to reserve. Must match the incrementer's label.
  • value - reserve up to this version number (1 to 999999).
  • prefix / padding - v + 3 → v001. Change either and you're talking about a different numbering space.
  • status - the confirmation string.
  • next_version - the version the incrementer will produce next; useful if you want to feed it somewhere.

Installing it

Ships in ComfyUI-CustomNodePacks. ComfyUI Manager → search "CustomNodePacks", or:

cd ComfyUI/custom_nodes
git clone https://github.com/Code2Collapse/ComfyUI-CustomNodePacks.git

Pure filesystem mkdir, zero dependencies, zero models. The pack overall wants opencv-python>=4.7.0 and scipy>=1.10.0 for other nodes - install just those if missing (skip the full requirements.txt; it can clobber ComfyUI's torch). Restart ComfyUI.

Common issues

  • The incrementer still starts at v001 - your label, prefix, padding, or date_format don't match what the incrementer uses. The reservation is invisible to it if the namespaces differ.
  • Reserved the wrong number - the node only creates; it doesn't delete. Remove the placeholder folders by hand (or just let the incrementer overwrite the namespace next run by deleting the date folder).
  • value is huge - creating 999,999 empty directories is technically allowed by the input range and technically a bad idea. Reserve only what you need.

The honest take: for 95% of users this node is a curiosity you'll install and forget. But the ability to claim a version without faking a file is exactly the kind of filesystem correctness the author was annoyed enough about to build the whole trio for - and when a client hands you a versioning spec, it's a lifesaver.

Categoryutils

Inputs (7)

NameTypeDefaultDescription
labelSTRINGdefaultFolder name under the output directory
valueINT11–999999Create placeholder dirs up to this version number
triggeropt*Optional any-type trigger input. Wire any upstream output here to control when this node runs in the graph.
prefixoptSTRINGvVersion-folder prefix. Default 'v' produces v001, v002, ... Must match what FolderIncrementer is using.
paddingoptINT31–10Zero-pad width for the version number (3 → v001, 4 → v0001). Must match what FolderIncrementer is using.
base_pathoptSTRINGOverride base directory. Leave empty → ComfyUI output dir.
date_formatoptCOMBOMM-DD-YYYYDate format (must match what FolderIncrementer uses)

Outputs (2)

NameTypeDescription
statusSTRINGStatus message confirming how many placeholder version dirs were created.
next_versionINTThe version number the *next* FolderIncrementer run will produce (value+1).