Visit ComfyUI Online for ready-to-use ComfyUI environment
Facilitates file navigation and selection within specified directory, filtering by extension and selecting using seed value.
The WalkFolderNode is designed to facilitate the navigation and selection of files within a specified directory. Its primary function is to traverse a given folder, filter files based on a specified extension, and select a file using a seed value. This node is particularly useful for AI artists who need to manage and organize large collections of files, such as images or datasets, by providing a systematic way to access and retrieve specific files. By leveraging this node, you can efficiently handle file logistics, ensuring that the right files are selected for your creative or analytical tasks.
The folder_path
parameter specifies the directory path where the node will search for files. It is crucial for defining the location of your files, and the node will only operate within this specified directory. The path must be valid and point to an existing directory; otherwise, an error will be raised. There is no default value, so you must provide a valid path for the node to function.
The seed
parameter is an integer that determines which file to select from the sorted list of files in the directory. It acts as an index, allowing you to choose a specific file based on its position in the sorted list. The seed must be within the range of available files; otherwise, an error will occur. The default value is 0, which selects the first file in the list.
The file_extension
parameter allows you to filter files by their extension, such as png
or jpg
. This is useful for narrowing down the search to specific file types. You can use an asterisk (*
) to include all file types. The default value is *
, meaning all files will be considered unless a specific extension is provided.
The file_path
output provides the full path to the file selected based on the seed value. This output is essential for accessing the specific file you need for further processing or analysis. It ensures that you have a direct reference to the file within the specified directory.
The file_info
output is a string that contains detailed information about the files in the directory. It includes the total number of files, the names of the first and last files, and the name of the currently selected file. This information is valuable for understanding the context of the file selection and for verifying that the correct file has been chosen.
folder_path
is correctly specified and points to an existing directory to avoid errors.file_extension
parameter to filter files effectively, especially when dealing with directories containing mixed file types.seed
value to select different files from the directory, which can be useful for iterating through a dataset or collection.<folder_path>
' is not valid.folder_path
does not exist or is not a directory.folder_path
is correct and points to an existing directory.<folder_path>
' matching extension '.<file_extension>
'file_extension
.file_extension
parameter to ensure it matches the file types in the directory, or use *
to include all files.<seed>
is out of range. There are only <number>
files.seed
value exceeds the number of available files in the directory.seed
value to be within the range of available files, starting from 0 up to the total number of files minus one.RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.