Visit ComfyUI Online for ready-to-use ComfyUI environment
Randomly select item from string list for workflow randomness with seed for reproducible results.
The LogicUtil_UniformRandomChoice
node is designed to randomly select an item from a list of choices provided in a string format. This node is particularly useful when you need to introduce an element of randomness into your workflow, such as selecting a random color, texture, or any other attribute from a predefined list. By parsing the input string based on a specified separator, the node ensures flexibility in how the choices are defined. The use of a seed value allows for reproducible results, which is beneficial for debugging or creating consistent outputs across different runs.
This parameter takes a string containing the list of choices separated by a specified character. The default value is "a$b$c", which means the choices are "a", "b", and "c". The input string can be customized to include any set of choices you want to randomize.
The separator parameter defines the character used to split the input string into individual choices. The default value is "$". You can change this to any character that suits your input string format, ensuring that the choices are correctly parsed.
The seed parameter is an integer that initializes the random number generator. The default value is 0. By setting a specific seed, you can ensure that the random choice is reproducible, which is useful for consistent results in repeated runs. The seed value can range from 0 to 9999999999.
The output is a single string, which is one of the choices from the input string, selected randomly based on the specified seed. This output can be used directly in your workflow wherever a random selection from a predefined list is needed.
© Copyright 2024 RunComfy. All Rights Reserved.