Visit ComfyUI Online for ready-to-use ComfyUI environment
Facilitates conditional logic based on string inputs for AI art workflows, enabling dynamic workflow alterations.
The CR Set Switch From String
node is designed to facilitate conditional logic based on string inputs within your AI art workflows. This node allows you to compare a given text string against up to four predefined switch strings and returns an integer value corresponding to the matched switch. This functionality is particularly useful for dynamically altering the flow of your workflow based on textual conditions, enabling more complex and responsive AI art generation processes. By leveraging this node, you can create more adaptable and intelligent workflows that respond to specific string inputs, enhancing the overall flexibility and control of your AI art projects.
This is the primary input string that will be compared against the predefined switch strings. It is a required parameter and must be provided for the node to function. The comparison is case-sensitive, and the text should be a single-line string. There is no default value for this parameter, and it must be explicitly set.
This is an optional string parameter that represents the first switch condition. If the text
input matches this string, the node will return a switch value of 1. The default value is an empty string.
This is an optional string parameter that represents the second switch condition. If the text
input matches this string, the node will return a switch value of 2. The default value is an empty string.
This is an optional string parameter that represents the third switch condition. If the text
input matches this string, the node will return a switch value of 3. The default value is an empty string.
This is an optional string parameter that represents the fourth switch condition. If the text
input matches this string, the node will return a switch value of 4. The default value is an empty string.
This output parameter is an integer that indicates which switch condition was met by the text
input. The value ranges from 1 to 4, corresponding to switch_1
to switch_4
. If no match is found, the output will be undefined.
This output parameter is a string containing a URL to the help documentation for this node. It provides additional information and usage examples to assist you in effectively utilizing the node.
text
input is exactly matched with one of the switch strings, as the comparison is case-sensitive.show_help
URL to access detailed documentation and examples to better understand the node's capabilities and potential applications.text
input did not match any of the provided switch strings.text
input exactly matches one of the switch strings, considering case sensitivity and any leading or trailing spaces.text
input parameter was not provided, which is necessary for the node to function.text
input parameter is set and contains a valid string.text
input.text
input for any discrepancies or typos. Ensure that at least one switch string is correctly set to match the text
input.© Copyright 2024 RunComfy. All Rights Reserved.