Visit ComfyUI Online for ready-to-use ComfyUI environment
Evaluate inputs, determine relationships, support various comparison functions for logical decision-making automation.
The Compare node is designed to evaluate two inputs and determine their relationship based on a specified comparison operation. This node is particularly useful for logical operations where you need to compare values and make decisions based on the result. It supports a variety of comparison functions such as equality, inequality, and relational comparisons, making it versatile for different logical conditions. By using this node, you can streamline your workflow by automating decision-making processes based on the comparison of inputs.
This parameter represents the first input value to be compared. It can be of any type, allowing for flexible comparisons across different data types. The default value is 0, but it can be adjusted to suit the specific needs of your comparison.
This parameter represents the second input value to be compared. Similar to parameter a
, it can be of any type, providing versatility in the types of comparisons you can perform. The default value is 0, but it can be modified as required.
This parameter specifies the type of comparison to be performed between a
and b
. The available options are "a == b", "a != b", "a < b", "a > b", "a <= b"
, and "a >= b". The default comparison is "a == b". This parameter determines the logical operation that will be applied to the inputs, influencing the outcome of the comparison.
The output of this node is a boolean value that represents the result of the comparison. If the specified comparison condition is met, the output will be True
; otherwise, it will be False
. This boolean output can be used in subsequent nodes to control the flow of your logic based on the comparison result.
"a <= b"
, or "a >= b".a
and b
are of incompatible types for the specified comparison.a
and b
are of compatible types that can be logically compared using the specified comparison function. Adjust the input types if necessary.© Copyright 2024 RunComfy. All Rights Reserved.