Visit ComfyUI Online for ready-to-use ComfyUI environment
Efficiently splits text prompts into manageable chunks for AI artists to process sequentially.
The VRGDG_IndexedPromptChunker is a versatile node designed to efficiently manage and manipulate large sets of text prompts by breaking them into smaller, manageable chunks. This node is particularly useful for AI artists who work with extensive prompt lists and need to process or analyze them in segments. By allowing you to specify the number of scenes or chunks you want to extract, the node provides a flexible way to handle prompts, making it easier to focus on specific parts of a larger text. The node's primary function is to split a given prompt text into a specified number of outputs, based on the index and total sets you define. This capability is essential for tasks that require sequential processing or when dealing with large datasets that need to be divided into smaller, more digestible parts.
The prompt_text parameter is a multiline string input that contains the entire set of prompts you wish to process. This text is expected to be formatted with each prompt separated by a pipe (|) character. The node will parse this input and split it into individual prompts based on the specified scene count and index. The default value is an empty string, and it supports multiline input to accommodate large text blocks.
The scene_count parameter determines the number of prompts to extract in each chunk. It directly impacts how many prompts will be outputted by the node in a single operation. The value can range from a minimum of 1 to a maximum of 50, with a default of 16. Adjusting this parameter allows you to control the granularity of the prompt chunks, making it easier to manage and process large prompt sets.
The index parameter specifies the starting point for the chunk extraction within the total set of prompts. It is an integer value that determines which segment of the prompt list to process. The index can range from 0 to 999, with a default value of 0. This parameter is crucial for navigating through different sections of your prompt list, especially when working with multiple sets or iterations.
The total_sets parameter indicates the total number of sets or iterations you plan to process. It helps the node determine if the specified index is valid and whether there are enough prompts to extract the desired chunk. The value can range from 1 to 999, with a default of 1. This parameter ensures that the node operates within the bounds of your dataset, preventing errors related to insufficient prompts.
The output parameters, named text_output_1 through text_output_50, represent the individual prompts extracted from the input text based on the specified scene count and index. Each output is a string that corresponds to a specific segment of the original prompt text. The number of outputs generated depends on the scene_count parameter, with each output containing one prompt or an empty string if there are not enough prompts to fill all requested outputs. These outputs are essential for further processing or analysis, allowing you to work with smaller, more focused sets of prompts.
scene_count to match the number of prompts you want to process at a time, ensuring you don't exceed the maximum of 50.index parameter to navigate through different sections of your prompt list, especially when working with multiple iterations or sets.prompt_text is properly formatted with each prompt separated by a pipe (|) character to avoid parsing errors.[PromptChunkerV2] ❌ Not enough prompts for index={index} with scene_count={scene_count}. Needed prompts up to {chunk_end}, but only {total_prompts} provided.prompt_text contains enough prompts to satisfy the requested scene_count and adjust the index or scene_count parameters accordingly to ensure they are within the bounds of your dataset.RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.