Visit ComfyUI Online for ready-to-use ComfyUI environment
Manage and manipulate text items by looping through a list with specified character separation, enabling random or sequential selection.
The text-util-loop-text
node is designed to help you manage and manipulate text by looping through a list of items separated by a specified character. This node allows you to select an item from the list based on a given seed value, which can be used to either randomly or sequentially pick an item. This functionality is particularly useful for tasks that require repetitive text processing or for generating variations of text based on a predefined list. By leveraging the seed value, you can ensure consistent and reproducible results, making it easier to manage and automate text-based workflows.
This parameter represents the input text that you want to process. The text should contain multiple items separated by a specified character. The default value is an empty string (''
), and it does not support multiline input. The text is split into a list of items based on the character specified in the char
parameter.
The seed parameter is an integer value used to determine the index of the item to be selected from the list. The seed value ensures that the selection process is consistent and reproducible. The default value is 0
, with a minimum value of 0
and a maximum value of 0xffffffffffffffff
. If the seed value is 0
, the first item in the list is selected. If the seed value exceeds the length of the list, it is wrapped around using the modulo operation.
This parameter specifies the character used to split the input text into a list of items. The default value is the pipe character ('|'
), and it does not support multiline input. The character should be chosen based on the structure of your input text to ensure proper splitting.
This output parameter returns the selected item from the list based on the seed value. The item is a string and represents one of the items from the input text that was split using the specified character.
This output parameter returns the seed value used in the selection process. It is an integer and helps in verifying the consistency and reproducibility of the results.
This output parameter returns the index of the selected item in the list. The index is a string and provides information about the position of the selected item within the list.
char
parameter to find the most suitable one for your input text structure.None
or not properly formatted, resulting in a failure to split the text into a list.© Copyright 2024 RunComfy. All Rights Reserved.