Visit ComfyUI Online for ready-to-use ComfyUI environment
Evaluate unary conditions on 2D vectors for filtering and validation purposes.
The CM_Vec2UnaryCondition JK
node is designed to evaluate a unary condition on a 2-dimensional vector (Vec2). This node allows you to apply a specific unary operation to a vector, which results in a boolean output indicating whether the condition is met. This can be particularly useful in scenarios where you need to validate or filter vectors based on certain criteria, such as checking if all components of the vector are positive or if the vector's magnitude exceeds a certain threshold. By leveraging this node, you can streamline your workflow and ensure that only vectors meeting your specified conditions are processed further.
The op
parameter specifies the unary operation to be applied to the vector. It is a required parameter and accepts a list of predefined operations. These operations are defined in the VEC_UNARY_CONDITIONS
dictionary and can include checks like whether all components of the vector are positive, if the vector is normalized, etc. The exact list of operations can be found in the VEC_UNARY_CONDITIONS
dictionary. This parameter is crucial as it determines the condition that will be evaluated on the vector.
The a
parameter represents the 2-dimensional vector (Vec2) on which the unary condition will be applied. It is a required parameter and typically takes a default value defined by DEFAULT_VEC2
. This vector is the subject of the unary operation specified by the op
parameter. The components of this vector are used in the condition check, and the result of this check will be a boolean value indicating whether the condition is satisfied.
The output of the CM_Vec2UnaryCondition JK
node is a boolean value. This boolean indicates whether the specified unary condition (op
) is met for the given vector (a
). If the condition is satisfied, the output will be True
; otherwise, it will be False
. This output is essential for decision-making processes in your workflow, allowing you to filter or branch logic based on the condition's result.
a
is correctly defined and within the expected range of values for the unary condition to work as intended.VEC_UNARY_CONDITIONS
dictionary to effectively utilize this node for various vector checks.op
parameter contains a value that is not recognized as a valid unary operation.op
parameter is set to one of the valid operations listed in the VEC_UNARY_CONDITIONS
dictionary.a
is not properly defineda
is either missing or not in the correct format expected by the node.a
is provided and follows the format of a 2-dimensional vector (Vec2), typically defined by DEFAULT_VEC2
.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.