Select Filename π₯π ₯π π ’(SelectFilename)
This node accepts a special data type `VHS_FILENAMES` as input, which is typically a structured list generated by other nodes in the same suite, such as the Load Video node.
Select Filename
The Select Filename π₯π
₯π
π
’ node receives a special data type VHS_FILENAMES as input, which is typically a structured list generated by other nodes within the same suite (such as the Load Video node).
The Select Filename node is a utility tool within the Video Helper Suite. Its core function is to select and output a specific filename from a pre-generated list of filenames based on a specified index position. It acts as a file selector, helping users precisely locate and use specific files within complex workflows.
Node Functionality
This node receives a special data type VHS_FILENAMES as input, which is typically a structured list generated by other nodes within the same suite (such as the Load Video node). Its internal mechanism accesses this list via an integer index and returns the filename (in string format) corresponding to that index. The index value supports negative numbers; for example, -1 typically represents the last element in the list.
Node Parameter Description - Select Filename π₯π ₯π π ’
Connection Inputs (Inputs)
| Parameter Name | Data Type | Required | Default Value | Range/Options | Description |
|---|---|---|---|---|---|
filenames | VHS_FILENAMES | Yes | - | - | **: Receives a list of filenames generated by other VHS nodes, from which a selection is made. |
Control Parameters (Parameters)
| Parameter Name | Data Type | Required | Default Value | Range/Options | Description |
|---|---|---|---|---|---|
index | INT | Yes | -1 | - | **: Specifies the position of the file to select within the list. Indexing starts at 0. -1 indicates selecting the last file. |
Output
| Parameter Name | Data Type | Description |
|---|---|---|
| Filename | STRING | **: Outputs the selected specific filename (in string format). |
Usage Scenarios
In video processing workflows, after you use the "Load Video" node to batch load multiple video files, that node outputs a list of filenames. You can then connect the Select Filename node and, by adjusting the value of the index parameter, dynamically select and output a specific filename from the list for use by subsequent nodes (such as nodes used to specify save paths).
Notes
Please note that the provided index value must be within the valid index range of the input filename list; otherwise, a runtime error may occur. The index -1 is a convenient option for directly selecting the last file in the list.
Select Filename π₯π ₯π π ’ Node Source Code Link
The Select Filename π₯π ₯π π ’ node is from the ComfyUI-VideoHelperSuite node package.
Comments
Sign in with GitHub to join the discussion.