Video Helper Suite πŸŽ₯πŸ…₯πŸ…—πŸ…’generated

Select Latest πŸŽ₯πŸ…₯πŸ…—πŸ…’(SelectLatest)

This node technically scans the file system to locate all files that start with `filename_prefix` and end with `filename_postfix`.

Select Latest

Filename
filename_prefix
output/AnimateDiff
filename_postfix
STRING
VideoHelperSuite

The Select Latest πŸŽ₯πŸ…₯πŸ…—πŸ…’ node technically works by scanning the file system to find all files that start with filename_prefix and end with filename_postfix.

The Select Latest node is a utility tool within the Video Helper Suite. Its core function is to automatically find and return the path of the latest file that matches specified naming rules. By combining the user-provided prefix and suffix, it locates the most recent matching file in the file system, thereby simplifying the steps of manually finding and entering file paths in complex workflows.

Node Functionality

Technically, this node scans the file system to find all files that start with filename_prefix and end with filename_postfix. It sorts these files based on their modification timestamps, selects the newest one, and finally outputs its complete file path as a STRING. This avoids the need for users to manually remember or input lengthy and error-prone filenames.

Node Parameter Description - Select Latest πŸŽ₯πŸ…₯πŸ…—πŸ…’

Control Parameters (Parameters)

Parameter NameData TypeRequiredDefault ValueValue Range/OptionsDescription
filename_prefixSTRINGYesoutput/AnimateDiff-Specifies the beginning part of the filename to search for, used to match the prefix of the file path.
filename_postfixSTRINGYes--Specifies the ending part of the filename to search for, typically the file extension, used to match the suffix of the file path.

Output

Parameter NameData TypeDescription
FilenameSTRINGOutputs the complete path string of the automatically found latest file.

Usage Scenario

In a typical video processing workflow, for example, after generating a series of videos using AnimateDiff, you can connect this node to the path input of a node that needs to load the latest generated video (such as VHS_LoadVideo). This way, every time the workflow runs, the system will automatically load the most recently created video file without requiring manual path updates, achieving process automation.

Notes

Please note that this node is currently marked as "EXPERIMENTAL," and its behavior may change in future versions. It relies on the operating system's file system timestamps. Ensure the target directory exists and contains matching files; otherwise, it may fail to return a valid path.

The Select Latest πŸŽ₯πŸ…₯πŸ…—πŸ…’ node is from the ComfyUI-VideoHelperSuite node package.

Comments

Sign in with GitHub to join the discussion.

Loading comments…