Visit ComfyUI Online for ready-to-use ComfyUI environment
Evaluate binary condition between 2D vectors, return boolean result based on specified operation.
The CM_Vec2BinaryCondition
node is designed to evaluate a binary condition between two 2-dimensional vectors (Vec2). This node allows you to compare two vectors using a specified operation and returns a boolean result based on the condition. It is particularly useful in scenarios where you need to determine the relationship between two vectors, such as checking if one vector is greater than, less than, or equal to another vector. This node simplifies complex vector comparisons, making it easier to implement conditional logic in your AI art projects.
This parameter specifies the binary condition operation to be applied between the two vectors. The available operations are predefined and can include comparisons such as equality, inequality, greater than, and less than. The exact list of operations can be found in the VEC_BINARY_CONDITIONS
dictionary. Choosing the correct operation is crucial as it determines the nature of the comparison between the vectors.
This parameter represents the first 2-dimensional vector (Vec2) to be compared. The vector should be provided in the form of a list or array containing two numerical values. This vector serves as one of the operands in the binary condition operation.
This parameter represents the second 2-dimensional vector (Vec2) to be compared. Similar to parameter a
, this vector should also be provided as a list or array containing two numerical values. This vector serves as the other operand in the binary condition operation.
The output of this node is a boolean value (BOOL
). This value indicates the result of the binary condition operation applied to the input vectors a
and b
. If the condition specified by the op
parameter is met, the output will be True
; otherwise, it will be False
. This boolean result can be used to drive further logic in your AI art workflow.
a
and b
are correctly formatted as lists or arrays with exactly two numerical values each.op
) based on the specific comparison you need to perform between the vectors.op
) is not found in the VEC_BINARY_CONDITIONS
dictionary.op
parameter is set to a valid operation from the predefined list in VEC_BINARY_CONDITIONS
.a
or b
are not formatted correctly as lists or arrays with two numerical values.a
and b
are provided as lists or arrays containing exactly two numerical values each.a
and b
contain only numerical values and are correctly converted to numpy arrays before the operation.© Copyright 2024 RunComfy. All Rights Reserved.