Nodes/ComfyUI Ino Nodes/Ino Compare Float
ComfyUI Node

Ino Compare Float

The gate node for conditional workflows

By nobandegani·Created about a year ago·Updated 2 months ago· 6
Ino Compare Float
    • BOOLEAN
    float_a0.00
    float_b0.00
    compare

    ComfyUI is great at "run the whole graph," and terrible at "only run this part if a number is big enough." That's what Ino Compare Float is for: it compares two floats with a chosen operator and hands you a clean boolean you can route through a switch. It's a boring little node, and boring is exactly what you want when it's the difference between a workflow that works and a workflow that needs a human to babysit it.

    This is one node in ComfyUI-InoNodes, the big 125+ node automation pack. The whole pack is built around chaining: string in, JSON out, booleans everywhere, success/message outputs so you can make decisions mid-pipeline. This node is the "decision" half of that story.

    What it does

    Three inputs: float_a, float_b, and a compare dropdown with the six operators =, <, >, <=, >=, <> (that last one is "not equal," a C-style !=). Both floats default to 0. One output: BOOLEAN, which is true when the comparison holds and false otherwise.

    Under the hood it's a straight Python comparison - no cleverness, no tolerance, no hidden rounding. What you'd expect.

    Where it earns its keep

    The output is a boolean, so you wire it into anything that accepts a bool or drives a switch:

    • Gate a step on size. Compare a resolution or an aspect ratio against a threshold, and only run an upscaler or a second pass when it clears the bar.
    • Quality / size automation. If the longer side of your image is under 1024, go upscale; if it's over, skip. That's an InoCompareFloat + a switch, done.
    • Batch logic. In a batch pipeline where a node reports a count or a size as a float, compare it against a target and branch.

    The IntHelper sibling, Ino Compare Int, does the identical job for integers if that's the type your data is in.

    Pairing it with switches

    A boolean out of a compare node is only useful if something acts on it. InoNodes ships a whole family of switch nodes for exactly this: Ino Switch On Bool routes between two inputs based on a boolean, and Ino Bool To Switch converts a bool to an index. So the shape of a conditional workflow here is: measure something → compare it → feed the bool into a switch that selects which branch of the graph actually runs. It's the ComfyUI equivalent of an if statement, and it's more usable than it sounds once you've seen one example.

    Installation

    Part of ComfyUI-InoNodes:

    • ComfyUI Manager: search "ComfyUI Ino Nodes", install, restart ComfyUI.
    • Manual: cd ComfyUI/custom_nodes && git clone https://github.com/nobandegani/comfyui_ino_nodes && cd comfyui_ino_nodes && pip install -r requirements.txt, then restart.

    Requires Python 3.10+ and ComfyUI 0.18.1+ (the pack is fully V3-schema). No models or credentials. The inopyutils dependency is bundled in requirements.txt, so the manual install above covers everything.

    One honest caveat: this is a tool for workflows that need to decide things. If you're hand-generating one image at a time, you don't need it - you're the branch. But if you're automating batches, this is the difference between a pipeline that watches itself and one that can't.

    CategoryInoFloatHelper

    Inputs (3)

    NameTypeDefaultDescription
    float_aFLOAT0.00
    float_bFLOAT0.00
    compareCOMBO6 options: =, <, >, <=, >=, <>

    Outputs (1)

    NameTypeDescription
    BOOLEANBOOLEAN