Visit ComfyUI Online for ready-to-use ComfyUI environment
Reverse condition outcome with NOT gate functionality for AI art project flow control.
The InvertCondition node is designed to reverse the outcome of a given condition, effectively acting as a NOT gate. This node is particularly useful when you need to invert the result of a condition evaluation, such as turning a True result into False and vice versa. It supports both Boolean and Logical NOT operations, making it versatile for different types of data. The Boolean NOT operation is straightforward, flipping the truth value, while the Logical NOT operation performs a binary inversion, which is more suitable for numeric values. This node is essential for controlling the flow of execution in your AI art projects, allowing you to dynamically alter the behavior of your prompts based on inverted conditions.
This parameter specifies the condition to be evaluated and inverted. It can take various forms such as "A is TRUE", "B is TRUE", "A is NONE", "B is NONE", "A == B", "A != B", "A > B", "A >= B", "A < B", "A <= B"
, "A is B", "A is not B", "A in B", "B in A", "A & B", "A | B", "A ^ B", and "CUSTOM". The condition determines the initial evaluation before inversion. For example, if the condition is "A == B" and A equals B, the result will be True before inversion.
This Boolean parameter determines whether the TRUE_IN and FALSE_IN inputs should be forwarded based on the condition's result. If set to True, the node will forward the TRUE_IN or FALSE_IN inputs depending on the condition's evaluation. If set to False, the node will return Boolean results directly. The default value is True, with "Return Inputs" as the label when enabled and "Return Boolean" when disabled.
This Boolean parameter indicates whether the result of the condition should be inverted post-evaluation. When enabled, the node will flip the result of the condition, turning True into False and vice versa. This is the core functionality of the InvertCondition node. The tooltip for this parameter is "Invert the result of the condition post-evaluation".
This String parameter is used when the condition is set to "CUSTOM". It allows you to define a custom expression for the condition. The expression can use variables A and B, as well as any named global variables from Memory Storage nodes. The default value is "2a == 5b+2", and it supports multiline input. This parameter is only active when the condition is "CUSTOM", and it is disabled otherwise.
This parameter accepts any type of data that will be forwarded to other nodes after inverting the condition. It is used to pass the data through the node based on the inverted condition's result.
This Boolean parameter determines the type of NOT operation to be executed. If set to True, a Boolean NOT operation will be performed. If set to False, a Logical NOT operation (binary inversion) will be executed. The default value is True, with "boolean" as the label when enabled and "logical" when disabled.
This parameter provides the data that will be forwarded to other nodes after the condition has been inverted. The output depends on the mode and the initial condition's evaluation. If the mode is Boolean, the output will be the inverted Boolean result. If the mode is Logical, the output will be the binary-inverted value.
<error_message>
. DEFAULTING TO FALSE."© Copyright 2024 RunComfy. All Rights Reserved.