Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI-Desert-Pixel-Nodes > IF Int Condition

ComfyUI Node: IF Int Condition

Class Name

DP IF Int Condition

Category
Desert Pixel/Logic
Author
DesertPixelAi (Account age: 840days)
Extension
ComfyUI-Desert-Pixel-Nodes
Latest Updated
2025-06-22
Github Stars
0.03K

How to Install ComfyUI-Desert-Pixel-Nodes

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

IF Int Condition Description

Facilitates AI art logic by evaluating integer conditions with mandatory and optional criteria.

IF Int Condition:

The DP IF Int Condition node is designed to facilitate logical decision-making within your AI art projects by evaluating integer-based conditions. This node allows you to define two separate conditions, where the first condition is mandatory and the second is optional, acting as an "OR" condition. By comparing integer values using logical operators such as "equal," "smaller," and "bigger," the node determines which result to output based on whether the conditions are met. This functionality is particularly useful for creating dynamic and responsive art pieces that adapt based on numerical inputs, enhancing the interactivity and complexity of your projects.

IF Int Condition Input Parameters:

if_value

This parameter represents the integer value that you want to evaluate against the first condition. It serves as the primary input for the logical comparison. The default value is 0, with a minimum of -18,446,744,073,709,551,615 and a maximum of 18,446,744,073,709,551,615. Adjusting this value will directly impact whether the first condition is met.

if_logic

This parameter specifies the logical operator used for the first condition. You can choose from "equal," "smaller," or "bigger," which determine how the if_value is compared to compare_if_with. The choice of logic affects the outcome of the condition check.

compare_if_with

This integer parameter is the value against which if_value is compared using the if_logic operator. It has the same range as if_value, with a default of 0. This parameter is crucial for defining the threshold or target value for the first condition.

or_value

This parameter is used in the optional second condition, acting as an "OR" condition. It is an integer value that will be compared to compare_or_value if the first condition is not met. The default is 0, with the same range as if_value.

compare_or_with

This parameter determines the logical operator for the second condition. Options include "off," "equal," "smaller," and "bigger." If set to "off," the second condition is ignored. Otherwise, it defines how or_value is compared to compare_or_value.

compare_or_value

This integer parameter is the value against which or_value is compared using the compare_or_with operator. It shares the same range and default as if_value. This parameter is essential for setting the criteria for the optional second condition.

result_if_true

This parameter defines the integer result returned by the node if either the first or second condition is met. The default value is 1, with the same range as if_value. It allows you to specify the desired output when conditions are satisfied.

result_if_false

This parameter specifies the integer result returned if neither condition is met. The default is 0, with the same range as if_value. It provides a fallback output when conditions are not satisfied.

IF Int Condition Output Parameters:

INT

The output of this node is a single integer value. It represents the result of the condition evaluation, either result_if_true or result_if_false, depending on whether the specified conditions are met. This output can be used to drive further logic or influence other aspects of your AI art project.

IF Int Condition Usage Tips:

  • Use the if_logic and compare_if_with parameters to set up a primary condition that aligns with your project's needs, ensuring that the if_value is appropriately compared.
  • Leverage the compare_or_with and compare_or_value parameters to create a secondary condition that provides flexibility and adaptability, especially when the primary condition might not always be met.

IF Int Condition Common Errors and Solutions:

Incorrect Logical Operator

  • Explanation: Using an invalid logical operator in if_logic or compare_or_with.
  • Solution: Ensure that the logical operators are set to one of the valid options: "equal," "smaller," or "bigger."

Unmet Conditions

  • Explanation: Neither condition is met, resulting in the result_if_false output.
  • Solution: Verify that the input values and logical operators are correctly configured to meet at least one condition, or adjust the result_if_false to a more suitable fallback value.

IF Int Condition Related Nodes

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

IF Int Condition