Folder Version Check:
FolderIncrementerReset is a utility node designed to report the current version state of a folder based on today's date. It scans the directory structure under a specified base path, typically formatted as /
Folder Version Check Input Parameters:
label
The label parameter specifies the folder label under which the version folders are organized. It acts as an identifier for the project or task you are working on. By default, it is set to "default". This parameter helps in categorizing and locating the version folders within the base directory.
date_format
The date_format parameter determines the format of the date used in the directory structure. It must match the format used by the FolderIncrementer node. The default format is "MM-DD-YYYY", which is a common date representation. This ensures that the node scans the correct subfolder corresponding to the current date.
trigger
The trigger parameter is an optional input that allows you to connect any upstream output to force the node to re-run after a specific node finishes. This is useful for dynamically updating the version state after certain operations, such as saving an image, are completed.
base_path
The base_path parameter allows you to override the default base directory where the version folders are located. If left empty, it defaults to the ComfyUI output directory. This flexibility enables you to specify a custom directory path for version management, accommodating different project structures.
Folder Version Check Output Parameters:
status
The status output provides a human-readable message describing how many version folders exist for the specified label and date. This message helps you quickly understand the current state of versioning without needing to manually check the directory structure.
current_version
The current_version output returns the highest existing version number found in the scanned directory. If no version folders exist yet, it returns 0. This output is crucial for determining the next version number to be used, ensuring continuity in versioning.
Folder Version Check Usage Tips:
- Ensure that the
date_formatmatches the format used by other nodes in your workflow to avoid discrepancies in folder scanning. - Use the
triggerparameter to automatically update the version state after key operations, ensuring that your version control remains up-to-date without manual intervention.
Folder Version Check Common Errors and Solutions:
Directory not found
- Explanation: The specified base path or label/date directory does not exist.
- Solution: Verify that the
base_pathandlabelparameters are correctly set and that the directory structure exists as expected.
Invalid date format
- Explanation: The
date_formatdoes not match the format used by the FolderIncrementer node. - Solution: Ensure that the
date_formatparameter is set to the same format used by other nodes in your workflow, typically "MM-DD-YYYY".
