DivisorDePrompts (10):
DivisorDePrompts is a custom node designed for ComfyUI that specializes in dividing multiline text into up to ten independent prompts, using paragraphs as separators. This node is particularly beneficial for AI artists who work with complex prompt structures, as it simplifies the process of managing and organizing multiple prompts within a single text input. By automatically parsing and splitting text based on paragraph breaks, DivisorDePrompts streamlines the workflow, allowing you to focus on the creative aspects of prompt generation without worrying about manual text segmentation. Its primary goal is to enhance efficiency and accuracy in handling multiple prompts, making it an essential tool for those who frequently work with detailed and varied prompt inputs.
DivisorDePrompts (10) Input Parameters:
full_text
The full_text parameter is the main input for the DivisorDePrompts node, where you provide the multiline text that you wish to divide into separate prompts. This parameter accepts a string of text that can contain multiple paragraphs, each representing a distinct prompt. The node will process this text and split it into individual prompts based on paragraph breaks. There are no specific minimum or maximum values for this parameter, but the text should be structured in a way that clearly delineates each prompt with paragraph breaks.
trim_mode
The trim_mode parameter is a boolean option that determines whether to trim whitespace from the beginning and end of each prompt after splitting. When set to True, any leading or trailing spaces in the prompts will be removed, ensuring clean and concise output. This parameter is useful for maintaining a tidy prompt structure and avoiding unintended spaces that could affect the interpretation of the prompts. The default value is True.
preserve_newlines
The preserve_newlines parameter is a boolean option that controls whether to retain internal newline characters within each prompt. When set to True, the node will preserve any newline characters found within the text of each prompt, allowing for more complex prompt structures that include line breaks. This is particularly useful for prompts that require specific formatting or multiline content. The default value is True.
DivisorDePrompts (10) Output Parameters:
prompts
The prompts output parameter is a list of strings, each representing an individual prompt extracted from the input text. This output provides you with the separated prompts, allowing for easy manipulation and use in subsequent processes. The number of prompts in the list will not exceed ten, as the node is designed to handle up to ten prompts at a time.
count
The count output parameter is an integer that indicates the total number of prompts successfully extracted from the input text. This count helps you verify the number of prompts processed and ensures that the node has correctly identified and separated the intended number of prompts.
DivisorDePrompts (10) Usage Tips:
- Ensure that your input text is well-structured with clear paragraph breaks to facilitate accurate prompt separation.
- Use the
trim_modeparameter to remove unwanted spaces from your prompts, ensuring clean and precise output. - If your prompts require specific formatting with line breaks, set
preserve_newlinestoTrueto maintain the desired structure.
DivisorDePrompts (10) Common Errors and Solutions:
"Count debe ser 0"
- Explanation: This error occurs when the input text is empty, resulting in a count of zero prompts.
- Solution: Ensure that your input text contains valid prompts separated by paragraph breaks.
"Debe limitar a 10"
- Explanation: This error indicates that more than ten prompts were provided, but the node is limited to processing only ten.
- Solution: Adjust your input text to include no more than ten prompts, or consider splitting your input into multiple batches if necessary.
"Debe preservar newlines internos"
- Explanation: This error suggests that internal newlines were expected to be preserved but were not.
- Solution: Verify that the
preserve_newlinesparameter is set toTrueif you need to maintain internal line breaks within prompts.
