File Batch Prompt Scheduler (CRT):
The CRT_FileBatchPromptScheduler is a specialized node designed to facilitate the batch processing of text prompts from files within a specified directory. Its primary function is to read text files, extract prompts, and prepare them for further processing in AI art generation workflows. This node is particularly beneficial for users who need to manage and utilize large collections of text prompts stored in files, as it automates the selection and scheduling of these prompts based on user-defined criteria. By leveraging this node, you can efficiently handle multiple prompts, ensuring that they are appropriately conditioned and ready for use in generating creative outputs. The node's ability to navigate through directories, optionally including subfolders, and its capability to handle various file extensions make it a versatile tool for organizing and deploying text prompts in batch operations.
File Batch Prompt Scheduler (CRT) Input Parameters:
clip
The clip parameter represents the model or framework used for tokenizing and encoding the text prompts. It is essential for transforming the text into a format that can be processed by the AI system, ensuring that the prompts are effectively utilized in generating outputs. This parameter does not have specific minimum or maximum values, as it depends on the model being used.
folder_path
The folder_path parameter specifies the directory path where the text files containing prompts are located. It is crucial for directing the node to the correct location to retrieve the files. The path must be a valid directory, and there are no specific minimum or maximum values, but it should be a string representing a valid path.
batch_count
The batch_count parameter determines the number of prompts to be processed in each batch. It impacts the volume of data handled at once, influencing the node's performance and the speed of processing. The minimum value is 1, and there is no explicit maximum, but it should be set according to the system's capacity and the user's needs.
seed
The seed parameter is used to ensure the reproducibility of the prompt selection process. By setting a specific seed value, you can achieve consistent results across different runs, which is useful for debugging and iterative testing. The seed is typically an integer, and while there is no strict minimum or maximum, it should be chosen to suit the desired level of randomness.
file_extension
The file_extension parameter defines the type of files to be considered for prompt extraction, such as .txt. It filters the files in the specified directory, ensuring that only relevant files are processed. The parameter should be a string representing the desired file extension, and it must include the leading dot.
max_words
The max_words parameter limits the number of words extracted from each file, ensuring that prompts do not exceed a certain length. This is important for maintaining consistency and preventing overly long prompts that might affect processing. The minimum value is 1, and there is no explicit maximum, but it should be set based on the desired prompt length.
crawl_subfolders
The crawl_subfolders parameter is a boolean that determines whether the node should include subdirectories when searching for files. Setting this to True allows for a more comprehensive search, while False restricts the search to the specified directory only. This parameter is useful for organizing files across multiple folders.
print_index
The print_index parameter is a boolean that indicates whether to include an index number with each prompt in the output. This can be helpful for tracking and referencing prompts, especially when dealing with large batches. Setting it to True will include the index, while False will omit it.
File Batch Prompt Scheduler (CRT) Output Parameters:
conditioning
The conditioning output is a list containing the encoded representations of the prompts, along with their pooled outputs. This data is crucial for the AI model to understand and generate creative outputs based on the prompts. It ensures that the prompts are in a format suitable for further processing.
prompt_count
The prompt_count output indicates the number of prompts successfully processed and included in the batch. This provides a quick reference for users to verify the volume of data handled by the node, ensuring that the expected number of prompts is being utilized.
final_text
The final_text output is a string that consolidates all the processed prompts, optionally including their indices if print_index is set to True. This output is useful for reviewing the prompts and ensuring that they have been correctly extracted and formatted.
File Batch Prompt Scheduler (CRT) Usage Tips:
- Ensure that the
folder_pathis correctly set to the directory containing your text files to avoid file loading errors. - Use the
seedparameter to maintain consistency across different runs, especially when testing or debugging. - Adjust the
batch_countaccording to your system's capacity to optimize performance without overloading resources. - Set
crawl_subfolderstoTrueif your prompts are organized in multiple subdirectories to ensure all relevant files are processed.
File Batch Prompt Scheduler (CRT) Common Errors and Solutions:
File loading error
- Explanation: This error occurs when the node is unable to read files from the specified directory, possibly due to an incorrect
folder_pathor file permissions. - Solution: Verify that the
folder_pathis correct and that the directory and files have the necessary read permissions.
No valid files found
- Explanation: This error indicates that no files matching the specified
file_extensionwere found in the directory. - Solution: Check that the
file_extensionis correctly specified and that the directory contains files with that extension.
Prompt extraction failure
- Explanation: This error happens when the node fails to extract text from a file, possibly due to encoding issues.
- Solution: Ensure that the files are encoded in UTF-8 and do not contain unsupported characters.
