Visit ComfyUI Online for ready-to-use ComfyUI environment
Sequentially yield elements from input string split by separator, for controlled iteration with reset option.
The LogicUtil_YieldableIteratorString
node is designed to sequentially yield elements from a given input string, which is split based on a specified separator. This node is particularly useful when you need to process or iterate through a list of items in a controlled manner. If the reset
parameter is set to True
, the iteration starts from the beginning of the list; otherwise, it continues from where it left off. This functionality is beneficial for tasks that require repeated access to elements in a list without manually managing the iteration state.
This parameter represents the string that will be split into individual elements based on the specified separator. The node will yield these elements one by one. The default value is "a$b$c"
, which means the string will be split into ["a", "b", "c"]
if the separator is $
.
The separator is a string that defines how the input_string
will be split into individual elements. For example, if the separator is $
, the string "a$b$c"
will be split into ["a", "b", "c"]
. The default value is $
.
The reset
parameter is an integer that determines whether the iteration should start from the beginning of the list. If set to 1
(True), the iteration resets to the first element. If set to 0
(False), the iteration continues from the last yielded element. The default value is 0
, with a minimum value of 0
and a maximum value of 1
.
The output is a single string element from the list generated by splitting the input_string
using the specified separator
. This element is yielded sequentially based on the current state of the iterator.
reset
parameter to 1
after reaching the end of the list to start over from the beginning.input_string
to ensure accurate splitting.input_string
is formatted correctly and the separator
is chosen appropriately.input_string
is correctly formatted and the separator
is properly set. If the list is empty or the separator does not match, adjust the input_string
and separator
accordingly.separator
is an empty string, which is not allowed.separator
to split the input_string
correctly.input_string
is None
or not properly initialized.input_string
is a valid string and not None
. Initialize the input_string
with a proper value before using the node.© Copyright 2024 RunComfy. All Rights Reserved.