Visit ComfyUI Online for ready-to-use ComfyUI environment
Facilitates conditional logic for AI art workflows, enabling decision-making based on specified conditions.
The Bjornulf_IfElse node is designed to facilitate conditional logic within your AI art workflows, allowing you to execute different actions based on the evaluation of a condition. This node acts as a decision-making tool, where you can specify a condition and determine what should happen if the condition is true or false. It supports various types of comparisons, including string equality, boolean checks, and numeric comparisons, making it versatile for different scenarios. By using this node, you can streamline your processes by automating decisions, which can lead to more dynamic and responsive art generation workflows. The node's primary function is to evaluate the given condition and return specified outputs based on the result, thus providing a flexible mechanism to control the flow of your creative projects.
The input parameter is the primary value that you want to evaluate against a condition. It can be of any type, such as a string, number, or boolean, depending on the comparison you wish to perform. This parameter is crucial as it determines the outcome of the conditional logic applied by the node.
The input_type parameter specifies the type of comparison to be performed between the input and compare_with values. It offers several options, including string equality, boolean checks, and numeric comparisons like greater than or less than. The default value is "STRING: input EQUAL TO compare_with". This parameter dictates how the node interprets the input and compare_with values, thus affecting the result of the condition.
The send_if_true parameter defines the output that will be returned if the condition evaluates to true. This can be any value or object that you want to pass along in your workflow when the specified condition is met. It is essential for determining the path your workflow will take when the condition is satisfied.
The compare_with parameter is the value against which the input is compared. It must be compatible with the input type and the specified input_type comparison. This parameter is integral to the conditional logic, as it serves as the benchmark for evaluating the input.
The send_if_false parameter is an optional value that will be returned if the condition evaluates to false. Like send_if_true, it can be any value or object, and it determines the alternative path your workflow will take when the condition is not met.
The output parameter is the result returned by the node when the condition evaluates to true. It corresponds to the send_if_true input and represents the successful path of the conditional logic.
The rejected parameter is the result returned by the node when the condition evaluates to false. It corresponds to the send_if_false input, or send_if_true if send_if_false is not provided, representing the alternative path of the conditional logic.
The input_type output provides a string representation of the type of comparison that was performed. This can be useful for debugging or logging purposes, as it indicates how the input and compare_with values were evaluated.
The true_or_false output is a string that indicates the result of the condition evaluation, either "True" or "False". This output is useful for understanding the outcome of the conditional logic.
The details output provides a comprehensive string containing information about the evaluation process, including the inputs, comparison type, and result. This can be valuable for debugging or for gaining insights into how the node reached its decision.
input and compare_with values are compatible with the specified input_type to avoid unexpected results.details output to gain insights into the evaluation process, which can help in debugging and understanding the node's behavior.send_if_false value to handle cases where the condition is not met, ensuring that your workflow can proceed smoothly in either scenario.input or compare_with values are not valid numbers, but a numeric comparison is specified.input and compare_with are valid numeric values when using numeric comparison types.input value is not a recognizable boolean value, but a boolean check is specified.input is a valid boolean representation, such as "true", "false", "1", "0", "yes", "no", "y", "n", "on", or "off".RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.