Overview

The Playbook Number node in ComfyUI allows users to define a numeric input constrained by a minimum and maximum value. It provides the ability to specify a default value and ensures the output remains within a valid range.

🛠️ Node Configuration

Inputs

NameTypeRequiredDefaultDescription
idSTRING“Node ID”Unique identifier for the node.
labelSTRING“Node Label”Label for the node.
minINT0Minimum value the node can output.
maxINT100Maximum value the node can output.
default_valueINT0Default value (optional).

Outputs

NameTypeDescription
numberINTThe generated integer output.

⚙️ Functionality

  • Ensures that the output is always within the range [min, max].
  • If id is empty or not numeric, it returns the default_value constrained within the min-max range.
  • If id is provided and numeric, it is converted to an integer and clipped within the min-max range.
  • Uses np.clip to maintain constraints.