ComfyUI  >  Nodes  >  ComfyMath >  IntToBool

ComfyUI Node: IntToBool

Class Name


evanspearman (Account age: 4247 days)
Latest Updated
Github Stars

How to Install ComfyMath

Install this extension via the ComfyUI Manager by searching for  ComfyMath
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyMath 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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

IntToBool Description

Converts integer to boolean, returning True for non-zero values and False for zero, streamlining conditional logic workflows.


The CM_IntToBool node is designed to convert an integer value into a boolean value. This node is particularly useful when you need to interpret numerical data as boolean values, which can be essential in various logical operations and decision-making processes within your AI art projects. The primary function of this node is to evaluate whether the given integer is zero or non-zero, returning False for zero and True for any non-zero value. This conversion can help streamline workflows that require conditional logic based on numerical inputs.

IntToBool Input Parameters:


This parameter represents the integer value that you want to convert to a boolean. The function of this parameter is to provide the numerical input that will be evaluated. If the integer is zero, the output will be False; if it is any other value, the output will be True. The default value for this parameter is 0, which means that if no other value is provided, the node will return False.

IntToBool Output Parameters:


The output parameter is a boolean value that represents the result of the conversion. If the input integer is zero, the output will be False; if the input integer is any non-zero value, the output will be True. This boolean output can be used in subsequent nodes that require boolean inputs, enabling more complex logical operations and decision-making processes in your AI art projects.

IntToBool Usage Tips:

  • Use this node to simplify conditional logic in your workflows by converting numerical data to boolean values.
  • Combine this node with other boolean operations to create more complex decision-making processes based on numerical inputs.

IntToBool Common Errors and Solutions:

Invalid input type

  • Explanation: The input provided is not an integer.
  • Solution: Ensure that the input value is an integer. If you are using a different data type, convert it to an integer before passing it to the CM_IntToBool node.

Missing input parameter

  • Explanation: The required input parameter a is not provided.
  • Solution: Make sure to provide an integer value for the a parameter when using the node. The default value is 0, but you can specify any integer as needed.

IntToBool Related Nodes

Go back to the extension to check out more related nodes.

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.