Visit ComfyUI Online for ready-to-use ComfyUI environment
Node evaluates two inputs with specified operation, supporting various comparison operators for decision-making automation in creative workflows.
The Comparison node evaluates two inputs based on a specified operation. It accepts two inputs (A and B), comparison operators, and optional values for successful and failed comparisons. The node performs the specified operation element-wise between corresponding elements of A and B. If the comparison is successful for all elements, it returns the success value; otherwise, it returns the failure value. The node supports various comparison operators such as EQUAL, GREATER_THAN, LESS_THAN, AND, OR, IS, IN, etc. This node is particularly useful for AI artists who need to automate decision-making processes based on the comparison of different data sets or values, ensuring that their creative workflows are both efficient and dynamic.
This parameter represents the primary input for the comparison operation. It accepts a full data type, which means it can handle various forms of data. The default value is None
, and it comes with a tooltip description "Master Comparator". This input is crucial as it serves as the main data set against which the secondary input will be compared.
This parameter represents the secondary input for the comparison operation. Similar to Lexicon.IN_A, it accepts a full data type and has a default value of None
. The tooltip description for this parameter is "Secondary Comparator". This input is compared against the primary input to determine the result of the comparison operation.
This parameter allows for an optional comparison value for the primary input. It accepts any data type and has a default value of None
. This parameter can be used to provide a specific value to compare against the primary input, adding flexibility to the comparison operation.
This parameter allows for an optional comparison value for the secondary input. It also accepts any data type and has a default value of None
. Similar to Lexicon.COMP_A, this parameter can be used to provide a specific value to compare against the secondary input.
This parameter specifies the comparison operator to be used in the operation. It accepts a set of predefined comparison operators such as EQUAL, GREATER_THAN, LESS_THAN, AND, OR, IS, IN, etc. The default value is EQUAL
. This parameter determines the type of comparison that will be performed between the primary and secondary inputs.
This parameter is a boolean that determines whether the comparison should be flipped. The default value is False
. When set to True
, the comparison operation is reversed, which can be useful in scenarios where the inverse comparison is needed.
This output parameter indicates whether the comparison was successful. It returns a number that signifies the result of the comparison operation. If the comparison is successful for all elements, this parameter will return the success value.
This output parameter provides the value resulting from the comparison operation. It returns a number that represents the outcome of the comparison. If the comparison fails for any element, this parameter will return the failure value.
None
. Provide valid input values for the comparison operation.Β© Copyright 2024 RunComfy. All Rights Reserved.