Visit ComfyUI Online for ready-to-use ComfyUI environment
Evaluate numerical input against condition, return boolean result for dynamic AI art projects.
The CM_NumberUnaryCondition
node is designed to evaluate a single numerical input against a specified condition, returning a boolean result. This node is particularly useful for scenarios where you need to check if a number meets certain criteria, such as being positive, negative, or within a specific range. By leveraging this node, you can easily incorporate conditional logic into your AI art projects, enabling more dynamic and responsive behaviors based on numerical data.
The op
parameter specifies the unary condition to be applied to the input number. It is a string that must match one of the available unary conditions defined in the system. This parameter determines the type of check that will be performed on the input number. For example, it could check if the number is positive, negative, or zero. The available options for this parameter are predefined and can be selected from a list. There are no minimum or maximum values for this parameter, as it is a categorical selection. The default value is typically the first condition in the list.
The a
parameter represents the numerical input that will be evaluated against the specified unary condition. This parameter accepts both integer and float values. The value of a
is the subject of the condition check defined by the op
parameter. For instance, if the condition is to check if the number is positive, a
will be the number being checked. The default value for this parameter is 0.0, but it can be set to any numerical value as needed for your specific use case.
The output parameter BOOL
is a boolean value that indicates the result of the unary condition check. If the input number a
satisfies the condition specified by op
, the output will be True
; otherwise, it will be False
. This output is crucial for decision-making processes in your AI art projects, allowing you to branch logic based on numerical evaluations.
CM_NumberUnaryCondition
node to create conditional branches in your AI art workflow, enabling different actions based on whether a number meets certain criteria.op
parameter contains a value that is not recognized as a valid unary condition.op
parameter is set to one of the predefined unary conditions available in the system. Check the list of valid conditions and select an appropriate one.a
parameter contains a value that is not a valid number (integer or float).a
parameter is set to a valid numerical value. Ensure that it is either an integer or a float and not a string or other data type.© Copyright 2024 RunComfy. All Rights Reserved.