Story Split Node:
The StorySplitNode is a specialized utility designed to efficiently handle and split WAN 2.2 Story prompts into distinct segments. Its primary function is to parse and divide a block of text into four separate prompts, making it easier to manage and utilize in creative workflows. This node is particularly beneficial for users who work with large text outputs and need to break them down into manageable parts for further processing or analysis. It automatically detects various separators such as single, double, or triple newline characters, ensuring flexibility and adaptability to different text formats. Additionally, it offers the option to use a custom delimiter, providing further customization to suit specific needs. By streamlining the text segmentation process, the StorySplitNode enhances productivity and allows for more focused and organized content creation.
Story Split Node Input Parameters:
text
The text parameter is the primary input for the StorySplitNode, where you provide the block of text that you wish to split into separate prompts. This parameter accepts a string input and supports multiline text, allowing you to input large paragraphs or story outputs. The function of this parameter is to serve as the source material that the node will process and divide. There are no specific minimum or maximum values for this parameter, but it defaults to an empty string if not provided. The quality and structure of the input text directly impact the effectiveness of the node's splitting capabilities.
auto_split
The auto_split parameter is a boolean option that determines whether the node should automatically detect and use common separators like newline characters to split the text. When set to True, the node will attempt to identify and apply the most suitable separator from a predefined set, such as \n, \n\n, or \n\n\n. This parameter is crucial for users who prefer an automated approach to text segmentation without specifying a custom delimiter. The default value is True, meaning the node will automatically handle separators unless instructed otherwise.
custom_delimiter
The custom_delimiter parameter allows you to specify a custom string to be used as the delimiter for splitting the text. This option is particularly useful when the text contains unique or non-standard separators that the automatic detection might not recognize. By providing a specific delimiter, you can ensure that the text is divided according to your precise requirements. This parameter defaults to an empty string, indicating that no custom delimiter is set unless explicitly defined. It is important to note that if a custom delimiter is provided, it will override the automatic splitting behavior.
Story Split Node Output Parameters:
prompt_1
The prompt_1 output parameter represents the first segment of the split text. It contains the initial portion of the input text that has been divided based on the detected or specified delimiter. This output is essential for users who need to work with the first part of the text separately, allowing for targeted processing or analysis.
prompt_2
The prompt_2 output parameter provides the second segment of the split text. Similar to prompt_1, it contains the next portion of the input text following the first delimiter. This output is useful for users who need to handle the second part of the text independently, facilitating organized content management.
prompt_3
The prompt_3 output parameter delivers the third segment of the split text. It captures the subsequent portion of the input text after the second delimiter, enabling users to focus on this specific section for further tasks or modifications.
prompt_4
The prompt_4 output parameter contains the fourth and final segment of the split text. It represents the last portion of the input text that has been divided, providing users with a complete set of prompts for comprehensive content handling.
debug_info
The debug_info output parameter offers additional information about the splitting process, such as the number of parts found and the number of prompts cleaned. This output is valuable for troubleshooting and understanding how the node processed the input text, ensuring transparency and aiding in debugging efforts.
Story Split Node Usage Tips:
- To maximize the effectiveness of the StorySplitNode, ensure that your input text is well-structured and contains clear separators, whether they are newline characters or custom delimiters.
- If your text contains unique separators, utilize the
custom_delimiterparameter to specify them, ensuring accurate and precise text segmentation. - Regularly check the
debug_infooutput to understand how the node is processing your text and to identify any potential issues with the input format.
Story Split Node Common Errors and Solutions:
Empty input
- Explanation: This error occurs when the input text is empty or not provided, resulting in no content to split.
- Solution: Ensure that you provide a valid block of text in the
textparameter before executing the node.
No clear separator found
- Explanation: This error indicates that the node could not detect any of the common separators in the input text, leading to difficulties in splitting the content.
- Solution: Consider using the
custom_delimiterparameter to specify a unique separator present in your text, or restructure the input to include recognizable separators like newline characters.
