Visit ComfyUI Online for ready-to-use ComfyUI environment
Facilitates conditional logic for dynamic input selection in AI art workflows.
The LayerUtility: SwitchCase node is designed to facilitate conditional logic within your AI art workflows. This node allows you to dynamically select between different inputs based on a specified condition, making it a powerful tool for creating complex, conditional behaviors in your projects. By defining a switch condition and corresponding cases, you can control which input is passed through the node, enabling more flexible and responsive designs. This node is particularly useful for scenarios where you need to adapt the output based on varying conditions, enhancing the versatility and adaptability of your AI-generated art.
The switch_condition
parameter is a string that determines which case will be selected. It acts as the key that is compared against the defined cases to decide the output. This parameter is essential for the node's decision-making process. The default value is an empty string.
The case_1
parameter is a string that represents the first possible case for the switch condition. If the switch_condition
matches this value, the node will select the corresponding input. The default value is an empty string.
The case_2
parameter is a string that represents the second possible case for the switch condition. If the switch_condition
matches this value, the node will select the corresponding input. The default value is an empty string.
The case_3
parameter is a string that represents the third possible case for the switch condition. If the switch_condition
matches this value, the node will select the corresponding input. The default value is an empty string.
The input_default
parameter is the default input that will be used if none of the cases match the switch_condition
. This ensures that the node always has an output, even if the condition does not match any of the specified cases. This parameter can be of any type.
The input_1
parameter is the input that will be selected if the switch_condition
matches case_1
. This parameter is optional and can be of any type.
The input_2
parameter is the input that will be selected if the switch_condition
matches case_2
. This parameter is optional and can be of any type.
The input_3
parameter is the input that will be selected if the switch_condition
matches case_3
. This parameter is optional and can be of any type.
The output
parameter is the result of the switch case logic. It will be the input corresponding to the matched case or the input_default
if no cases match. This output can be of any type, depending on the inputs provided.
switch_condition
and case values are correctly defined to avoid mismatches.input_default
to provide a fallback option, ensuring that the node always produces an output.input_1
, input_2
, input_3
) to handle different scenarios dynamically.switch_condition
did not match any of the defined cases (case_1
, case_2
, case_3
).switch_condition
and case values are correctly defined and match exactly.input_default
is not provided, and no cases match the switch_condition
.input_default
is always provided to guarantee an output.© Copyright 2024 RunComfy. All Rights Reserved.