Visit ComfyUI Online for ready-to-use ComfyUI environment
Node compares numerical values based on conditions for dynamic AI art logic flows, enhancing flexibility and responsiveness.
The Number Input Condition node is designed to compare two numerical values based on a specified condition and return a result accordingly. This node is particularly useful for creating dynamic logic flows in your AI art projects, allowing you to make decisions based on numerical comparisons. Whether you need to check if one number is greater than another, if they are equal, or if one is divisible by the other, this node provides a versatile set of comparison operations to suit various needs. By leveraging this node, you can introduce conditional logic into your workflows, enhancing the flexibility and responsiveness of your AI-generated art.
This parameter represents the first numerical value to be compared. It can be any number and serves as one of the two primary inputs for the comparison operation. The value of number_a
directly impacts the outcome of the comparison based on the selected condition.
This parameter represents the second numerical value to be compared against number_a
. Similar to number_a
, it can be any number and is crucial for determining the result of the comparison operation. The value of number_b
is used in conjunction with number_a
to evaluate the specified condition.
This parameter determines whether the node should return a boolean result (true or false) based on the comparison. If set to "true", the node will return a boolean value indicating the result of the comparison. If set to "false", the node will return one of the input numbers based on the comparison. The default value is "false".
This parameter specifies the type of comparison to be performed between number_a
and number_b
. The available options include "greater-than", "greater-than or equals", "less-than", "less-than or equals", "equals", "does not equal", "divisible by", "if A odd", "if A even", "and", "or", "if A prime", and "factor of". Each option defines a different condition for comparing the two numbers, and the selected option determines the logic used to evaluate the comparison.
When return_boolean
is set to "false", this output returns one of the input numbers (number_a
or number_b
) based on the specified comparison condition. The exact value returned depends on the outcome of the comparison.
This output provides the result of the comparison as a floating-point number. It is useful for scenarios where a floating-point representation of the result is required.
This output provides the result of the comparison as an integer. It is useful for scenarios where an integer representation of the result is required.
comparison
parameter to define the specific condition you want to evaluate between number_a
and number_b
. This allows you to create complex logic flows based on numerical comparisons.return_boolean
to "true" if you need a simple true/false result from the comparison. This can be useful for conditional branching in your workflows.number_a
is larger than number_b
, or "divisible by" to see if number_b
is divisible by number_a
.comparison
parameter.comparison
parameter is set to one of the valid options: "greater-than", "greater-than or equals", "less-than", "less-than or equals", "equals", "does not equal", "divisible by", "if A odd", "if A even", "and", "or", "if A prime", or "factor of".number_a
set to zero.number_a
is not zero when using the "divisible by" comparison to avoid division by zero errors.© Copyright 2024 RunComfy. All Rights Reserved.