Visit ComfyUI Online for ready-to-use ComfyUI environment
Efficiently manage and randomly select files from a directory with filtering and seed control for reproducibility or variability.
The JDCN_AnyFileListRandom
node is designed to help you efficiently manage and randomly select files from a specified directory based on various filtering criteria. This node is particularly useful for AI artists who need to work with large datasets and require a random subset of files for their projects. By leveraging this node, you can easily filter files by type, extension, and even perform deep searches within subdirectories. The node also allows you to control the randomness of the selection process through seed values, ensuring reproducibility or variability as needed. Overall, JDCN_AnyFileListRandom
streamlines the process of file selection, making it easier to manage and utilize your data effectively.
This parameter specifies the directory path where the files are located. It is a string input and does not support multiline entries. The default value is "undefined". This parameter is crucial as it defines the root directory from which files will be selected.
This parameter allows you to filter files based on their type. The available options are "", "images", "audio", "video", "text", "tensors", and "folder". Selecting "" will include all file types, while other options will restrict the selection to specific file types. This helps in narrowing down the files to those relevant to your project.
This parameter specifies the file extensions to be included in the selection. The available options are "", along with specific extensions for tensors, images, audio, video, and text files. Selecting "" will include all extensions, while other options will restrict the selection to files with the specified extensions. This is useful for further refining the file selection.
This parameter sets the seed value for the random selection process. It is an integer input with a default value of 1, and it can range from 1 to 0xffffffffffffffff. The seed value ensures that the random selection can be reproduced if needed, providing consistency in your workflow.
This parameter controls how the seed value changes with each execution. The available options are "fixed", "increment", "decrement", and "random". This allows you to manage the variability of the random selection process, either keeping it consistent or introducing changes as required.
This parameter defines the number of files to be randomly selected. It is an integer input with a default value of 1, and it can range from 1 to 9999. This parameter is essential for controlling the size of the file subset you want to work with.
This parameter is a boolean that determines whether to perform a deep search within subdirectories. The default value is False. Enabling this option allows the node to search through all subdirectories within the specified folder path, providing a more comprehensive file selection.
This output parameter is a list of strings representing the paths of the randomly selected files. It provides the full paths to the files, making it easy to locate and use them in your projects.
This output parameter is a list of strings representing the names of the randomly selected files. It provides just the file names without the directory paths, which can be useful for display or logging purposes.
This output parameter is an integer representing the total number of files that matched the selection criteria. It gives you an overview of how many files were considered before the random selection was made.
folder_path
is correctly specified and accessible to avoid errors during file selection.filter_by
and extension
parameters to narrow down the file selection to relevant types and extensions, optimizing the node's performance.random_seed
and seed_change
parameters to control the randomness and reproducibility of the file selection process.batch_size
to manage the number of files you want to work with, balancing between too few and too many files.deep_search
if you need to include files from subdirectories, but be aware that this may increase the processing time.folder_path
to ensure it is correct and accessible. Verify that the filter and extension parameters are set appropriately. If the issue persists, review the console output for more specific error details.filter_by
and extension
parameters to ensure they are set correctly. Make sure the directory contains files that meet the specified criteria.random_seed
parameter is set to a value outside the acceptable range.random_seed
is an integer between 1 and 0xffffffffffffffff. Adjust the value accordingly and try again.batch_size
is set to a value greater than the number of files that match the selection criteria.batch_size
to a value that is less than or equal to the number of available files. You can check the Total
output parameter to see how many files are available.© Copyright 2024 RunComfy. All Rights Reserved.