Visit ComfyUI Online for ready-to-use ComfyUI environment
Evaluate 2D vector condition for boolean output, aiding AI artists in vector property checks for dynamic art generation.
The CM_Vec2UnaryCondition
node is designed to evaluate a specific condition on a 2-dimensional vector (Vec2) and return a boolean result. This node is particularly useful for AI artists who need to apply mathematical conditions to vectors in their creative workflows. By leveraging predefined unary conditions, this node simplifies the process of checking properties or states of vectors, enabling more dynamic and responsive art generation. The primary function of this node is to take a vector and an operation type as inputs, apply the specified unary condition, and output a boolean value indicating whether the condition is met.
This parameter specifies the unary condition to be applied to the vector. It is a string that must match one of the keys in the predefined VEC_UNARY_CONDITIONS
dictionary. The available options for this parameter are determined by the keys in this dictionary, which represent different unary conditions that can be checked on the vector. The choice of operation directly impacts the result of the node, as it defines the condition that will be evaluated. There are no minimum or maximum values for this parameter, but it must be one of the valid keys in the VEC_UNARY_CONDITIONS
.
This parameter represents the 2-dimensional vector (Vec2) on which the unary condition will be applied. The vector should be provided in a format that the node can interpret, typically as a list or array of two numerical values. The values in the vector can vary widely, but they should be within the range that makes sense for the specific condition being evaluated. The default value for this parameter is DEFAULT_VEC2
, which is a predefined vector that the node can use if no other vector is provided.
The output of this node is a boolean value (BOOL
). This value indicates whether the specified unary condition is met for the given vector. If the condition is true, the output will be True
; otherwise, it will be False
. This boolean result can be used in subsequent nodes or logic to control the flow of operations, making it a crucial part of dynamic and conditional workflows in AI art generation.
a
) is in the correct format and within the expected range for the condition being evaluated.VEC_UNARY_CONDITIONS
dictionary to effectively utilize this node for various checks and validations in your workflows.op
parameter does not match any of the keys in the VEC_UNARY_CONDITIONS
dictionary.op
parameter is set to one of the valid keys in the VEC_UNARY_CONDITIONS
dictionary.a
is not in the correct format or does not contain exactly two numerical values.a
is provided as a list or array of two numerical values.© Copyright 2024 RunComfy. All Rights Reserved.