LayerStyle

2167
By chflame
Updated 15 days ago
View on GitHub →See Common Issues →

A set of nodes for ComfyUI that can composite layer and mask to achieve Photoshop like functionality.

Available Nodes

LayerUtility: Boolean

LayerUtility: Boolean Operator Node Documentation

Overview

The LayerUtility: Boolean Operator node is designed for evaluating logical and comparison operations between two values within a ComfyUI workflow. This node can handle different types of operations such as equality checks, comparisons, and logical operations, allowing flexibility and functionality in managing data conditions.

Functionality

What This Node Does

The Boolean Operator node takes two input values and applies a specified logical or comparison operation to determine the result. Depending on the operation chosen, the outcome can involve checking equality, determining relational comparison (such as greater than or less than), or applying logical operations like AND, OR, XOR, and others.

Inputs

The node requires the following inputs:

  • a: The first operand for the operation. This can be any type since the node is designed to work with different data types.
  • b: The second operand for the operation. This operand is also flexible in type.
  • operator: Specifies the operation to be performed between the two operands. The available operations include:
    • ==: Equal to
    • !=: Not equal to
    • >: Greater than
    • <: Less than
    • >=: Greater than or equal to
    • <=: Less than or equal to
    • and: Logical AND
    • or: Logical OR
    • xor: Logical XOR (not equal comparison)
    • not(a): Logical NOT of the first operand
    • min: Returns the smaller of the two operands
    • max: Returns the larger of the two operands

Outputs

  • output (BOOLEAN): The result of the evaluated operation, returned as a Boolean value (True or False).

Usage in ComfyUI Workflows

The Boolean Operator node can be integrated into ComfyUI workflows where conditional logic needs to be applied. This includes:

  • Conditional Processing: Where certain branches of a workflow should be executed based on conditions.
  • Filtering Data: To evaluate and filter data based on logical or comparison criteria.
  • Decision-Making: Automated decisions in a workflow scenario where outcomes are determined by specific data conditions.

Special Features and Considerations

  • Flexibility in Types: The node is designed to cater to multiple data types, making it versatile in various workflow scenarios.
  • Comprehensive Operations: Provides a rich set of operations to cater to different logical and conditional requirements.
  • Robust Error Handling: In-built mechanisms prevent errors that might arise from type mismatches or invalid operations.

The LayerUtility: Boolean Operator node is essential for adding intelligent decision-making capabilities to your ComfyUI workflows, enabling enhanced control and adaptability based on dynamic data conditions.