LayerStyle
Run ComfyUI Easily with InstaSD
Skip the complex setup. InstaSD helps creative professionals build workflows and deploy them to the world:
- One-click deployment
- Any model, any node
- Powerful GPUs for rapid iteration
A set of nodes for ComfyUI that can composite layer and mask to achieve Photoshop like functionality.
Available Nodes
LayerUtility: BooleanOperatorV2
Documentation: LayerUtility - Boolean Operator V2
Overview
The "LayerUtility: Boolean Operator V2" node is designed to perform advanced boolean operations on given inputs in a ComfyUI workflow. This node provides the ability to evaluate logical conditions between two values, whether they be explicitly provided as strings or indirectly as previously computed values.
Functionality
-
Purpose: The primary function of this node is to perform boolean operations and comparisons between two input values using specified operators. It provides a flexible way to handle both string-formatted inputs and any other type of inputs.
-
Operators Available:
==: Equal to!=: Not equal to>: Greater than<: Less than>=: Greater than or equal to<=: Less than or equal toand: Logical ANDor: Logical ORxor: Logical XOR (exclusive or)not(a): Logical NOT on first inputmin: Minimum of two valuesmax: Maximum of two values
Inputs
The node accepts the following inputs:
-
Required Inputs:
- a_value: A string representation of the first value. Default is an empty string.
- b_value: A string representation of the second value. Default is an empty string.
- operator: The boolean operator to be used for the evaluation. Users must choose one from the provided list.
-
Optional Inputs:
- a: The first value. It will override
a_valueif provided. - b: The second value. It will override
b_valueif provided.
- a: The first value. It will override
Outputs
The node produces the following outputs:
-
output: A boolean result of the operation. It evaluates to
TrueorFalsebased on the logic applied using the specified operator. -
string: A string representation of the boolean result.
Usage in ComfyUI Workflows
The "Boolean Operator V2" node is versatile in its application within ComfyUI workflows. Here are a few ways it could be utilized:
-
Logical Conditions: Use this node to define logical conditions and branching logic in complex workflows, enabling different paths based on the evaluation of the inputs.
-
Input Evaluation: Transform and evaluate string-based inputs without pre-processing or conversion in a workflow, thus simplifying processes involving string data.
-
Decision Making: Allow dynamic decision-making based on real-time inputs and comparisons between variables within a workflow, such as user inputs or dynamically generated values.
Special Features or Considerations
-
Automatic Number Extraction: If
aorbis not directly provided, the node attempts to extract number(s) froma_valueandb_value, respectively, and uses the first number found for comparison. -
Operator Flexibility: Provides a rich set of operators that includes both traditional boolean logic operators and comparative operators, catering to diverse logical and arithmetic conditions.
-
Output Type: The node ensures that even if the conditions are evaluated using numerical data, the output is consistently presented as a boolean and a string, making it easy to link with subsequent nodes expecting boolean data.
The "LayerUtility: Boolean Operator V2" node empowers users to incorporate complex decision logic into their ComfyUI workflows, facilitating sophisticated control flow with ease.