Nodes/ComfyUI-CustomNodePacks/Folder Version Check
ComfyUI Node

Folder Version Check

See how many versions exist before you save another

By Code2Collapse·Created 6 months ago·Updated a day ago· 52
Folder Version Check
  • trigger
  • status
  • current_version
labeldefault
date_formatMM-DD-YYYY
base_path

Folder Version Check is the "how far along am I?" node of the FolderIncrementer trio in ComfyUI-CustomNodePacks. It doesn't change anything - it reports: for a given label and date, how many v001, v002, … folders already exist, and what the highest version number is. If you've been running a sweep all afternoon and you're not sure whether you're on v014 or v015, this is the node that tells you.

Let's get the naming out of the way, because it will trip you up: the class is FolderIncrementerReset but the display name is "Folder Version Check", and despite the class name there's no reset button hiding anywhere. To truly "reset" a version series, you delete the version folders from disk. The node's own docstring is honest about this - it scans and reports, and a real reset is a filesystem operation. The "Reset" in the class name is legacy from when it presumably did more.

How it works

Give it a label (the folder name to inspect, default "default") and a date_format (must match what the pack's Folder Version Incrementer uses - MM-DD-YYYY, DD-MM-YYYY, or YYYY-MM-DD), and it scans output/<label>/<today's date>/ counting version folders. It returns two things:

  • status (STRING) - a human-readable line like 'shot/08-25-2026': 5 version(s) exist – next will be v006, or the "no versions yet" message.
  • current_version (INT) - the highest existing version number, or 0 if none exist. This is the useful one: wire it into a label or a decision node.

There's also an optional trigger input - a wildcard that accepts any type - which exists to force the node to re-run after something upstream finishes. The tooltip example is perfect: wire it to a Save Image's filename output so the version state gets rechecked after a save. Without a trigger, ComfyUI may cache the result and show you a stale count.

The inputs and outputs that matter

  • label - the folder name. Must match the label/folder the incrementer uses, or you'll be counting the wrong directory.
  • date_format - keep it identical to your FolderIncrementer's setting.
  • trigger (optional) - the "re-run me after this happens" wire.
  • status - read it from the node's preview, or log it.
  • current_version - the number you can actually act on.

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 stdlib file scanning, no dependencies, no models. The pack overall wants opencv-python>=4.7.0 and scipy>=1.10.0 for other nodes - install just those if missing (not the full requirements.txt, which can clobber ComfyUI's torch). Restart ComfyUI.

Common issues

  • Reports "no versions" when you know there are versions - almost always a date_format or label mismatch with what the incrementer used. Both nodes must agree or they scan different directories.
  • Stale count - it's cached; the trigger input exists precisely to bust that cache. Wire something upstream in.
  • Looking for a reset button - there isn't one. Delete output/<label>/<date>/ to start fresh. That's the whole "reset."

The honest take: this is a companion node - useful mainly in automated or shared-workflow setups where the version count drives a decision. If you're just saving images and watching the folder, the incrementer's own output strings already tell you what you need.

Categoryutils

Inputs (4)

NameTypeDefaultDescription
labelSTRINGdefaultFolder name to inspect
date_formatCOMBOMM-DD-YYYYDate format (must match what FolderIncrementer uses)
triggeropt*Optional any-type trigger input. Connect any upstream output here to force this node to re-run after that node finishes (e.g. wire it to a SaveImage filename to recheck the version state after a save).
base_pathoptSTRINGOverride base directory. Leave empty → ComfyUI output dir.

Outputs (2)

NameTypeDescription
statusSTRINGHuman-readable status describing how many versions exist for this label/date.
current_versionINTHighest existing version number (0 if none yet).