ComfyUI > Nodes > ComfyUI-CRZnodes > CRZ Compare

ComfyUI Node: CRZ Compare

Class Name

CRZCompare

Category
CRZ
Author
CoreyCorza (Account age: 2722days)
Extension
ComfyUI-CRZnodes
Latest Updated
2025-09-09
Github Stars
0.04K

How to Install ComfyUI-CRZnodes

Install this extension via the ComfyUI Manager by searching for ComfyUI-CRZnodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-CRZnodes in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

CRZ Compare Description

Facilitates comparison of two values, supports numerical and string comparisons for versatile data evaluation in AI workflows.

CRZ Compare:

The CRZCompare node is designed to facilitate the comparison of two values, offering a versatile tool for determining relationships between them. This node is particularly useful in scenarios where you need to evaluate whether one value is greater than, less than, equal to, or not equal to another. By supporting both numerical and string comparisons, CRZCompare provides flexibility in handling different data types, ensuring that you can perform accurate comparisons regardless of the input format. This capability is essential for AI artists who need to make decisions based on dynamic data inputs, allowing for more complex and conditional workflows in their creative processes.

CRZ Compare Input Parameters:

a

The parameter a represents the first value to be compared. It can accept any data type, which means you can input numbers, strings, or other comparable entities. The default value for a is 0, but you can adjust it to suit your specific comparison needs. The value of a plays a crucial role in determining the outcome of the comparison, as it is directly compared against the value of b using the specified operator.

b

The parameter b is the second value in the comparison operation. Like a, it can accept any data type, allowing for a wide range of comparisons. The default value for b is also 0, providing a neutral starting point for numerical comparisons. The value of b is essential in the comparison process, as it serves as the reference point against which a is evaluated.

operator

The operator parameter defines the type of comparison to be performed between a and b. It is a hidden parameter with a default value of "=". The operator can be set to ">", "<", ">=", "<=", or "=", each representing a different comparison operation. This parameter determines the logic applied to the values of a and b, influencing the result of the comparison.

CRZ Compare Output Parameters:

BOOLEAN

The output of the CRZCompare node is a boolean value, which indicates the result of the comparison between a and b. If the specified condition is met (e.g., a is greater than b), the output will be True; otherwise, it will be False. This boolean output is crucial for decision-making processes, as it allows you to branch workflows or trigger specific actions based on the comparison result.

CRZ Compare Usage Tips:

  • Ensure that the values of a and b are compatible for the type of comparison you intend to perform. For instance, comparing strings with numerical operators may lead to unexpected results.
  • Use the operator parameter to tailor the comparison to your specific needs, whether you are checking for equality, inequality, or relational conditions.

CRZ Compare Common Errors and Solutions:

ValueError or TypeError during comparison

  • Explanation: This error occurs when the node attempts to convert the input values to numbers for comparison, but the conversion fails due to incompatible data types.
  • Solution: Ensure that both a and b are either numerical values or strings that can be meaningfully compared. If necessary, convert the inputs to a compatible format before using the node.

Unexpected comparison results

  • Explanation: If the comparison yields unexpected results, it may be due to the data types of a and b or the chosen operator.
  • Solution: Double-check the data types of your inputs and ensure that the operator is correctly set for the intended comparison. Adjust the inputs or operator as needed to achieve the desired outcome.

CRZ Compare Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-CRZnodes
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.