ComfyUI Node: Max

Class Name

MaxNode

Category
Math
Author
aria1th (Account age: 3016days)
Extension
ComfyUI-LogicUtils
Latest Updated
2026-01-21
Github Stars
0.1K

How to Install ComfyUI-LogicUtils

Install this extension via the ComfyUI Manager by searching for ComfyUI-LogicUtils
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-LogicUtils 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

Max Description

MaxNode selects the maximum value between two inputs, aiding in numerical comparisons and logic.

Max:

The MaxNode is a versatile mathematical node designed to determine the maximum value between two inputs. This node is particularly useful in scenarios where you need to compare two values and select the larger one, which can be beneficial in various computational and decision-making processes. By leveraging the MaxNode, you can streamline workflows that require conditional logic based on numerical comparisons, ensuring that the highest value is always chosen. This functionality is essential in applications ranging from simple arithmetic operations to more complex data processing tasks, making it a valuable tool for AI artists who need to incorporate mathematical logic into their creative projects.

Max Input Parameters:

input1

This parameter represents the first value to be compared. It can be of any type, allowing for flexibility in the types of data you can input. The function of this parameter is to serve as one of the two values that the node will evaluate to determine which is larger. There are no specific minimum, maximum, or default values for this parameter, as it is designed to accept a wide range of data types.

input2

Similar to input1, this parameter represents the second value to be compared. It also accepts any type, providing the same level of flexibility. The purpose of this parameter is to act as the second value in the comparison process, enabling the node to evaluate and return the maximum of the two inputs. Like input1, there are no predefined limits or default values for this parameter.

Max Output Parameters:

anytype

The output of the MaxNode is a single value of the same type as the inputs, representing the maximum of the two input values. This output is crucial as it provides the result of the comparison, allowing you to use the larger value in subsequent operations or decisions within your workflow. The flexibility of the output type ensures that the node can be seamlessly integrated into various contexts, regardless of the data types involved.

Max Usage Tips:

  • Ensure that both input parameters are of compatible types to avoid unexpected behavior or errors. While the node is designed to handle any type, logical comparisons should be meaningful.
  • Use the MaxNode in conjunction with other mathematical nodes to build complex logic structures, enhancing the decision-making capabilities of your AI models.

Max Common Errors and Solutions:

TypeError: '>' not supported between instances of 'type1' and 'type2'

  • Explanation: This error occurs when the node attempts to compare two values of incompatible types, such as a string and an integer.
  • Solution: Ensure that both input parameters are of types that can be logically compared. Convert or cast the inputs to compatible types before passing them to the node.

ValueError: Input cannot be None

  • Explanation: This error is raised when one or both input parameters are None, which is not a valid input for comparison.
  • Solution: Check that both inputs are properly initialized and not None before using the MaxNode. Ensure that your data sources are providing valid values.

Max Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-LogicUtils
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.