Nodes/PixelML ComfyUI Nodes/IntegerInput_PixelML
ComfyUI Node

IntegerInput_PixelML

The integer input that turns a string into a clamped, sampler-safe number

By PixelML·Created 2 years ago·Updated 2 years ago· 0
IntegerInput_PixelML
    • INT
    nameint_input
    value0
    min-2147483648
    max2147483647

    At first glance IntegerInput_PixelML looks like the integer primitive you already get by right-clicking a number widget in ComfyUI and hitting "Convert to input." Don't let that fool you. The value field is a string, not a number - the node parses whatever text you feed it, clamps it into a min/max range, and hands you a clean INT on the other side. If an LLM, a wildcard file, a CSV row, or an API response is ever handing your workflow numbers as text, this is the node that makes the handoff painless.

    It ships in the PixelML ComfyUI Nodes pack, a small collection focused on variable handling and workflow automation. Everything in it leans toward the same goal: letting values flow around the graph as strings and getting typed, in-range numbers where they land.

    How it works

    The mechanism is four lines of Python dressed up as a node. On run it takes the value string, tries int(value), and clamps the result to [min, max]. If the string can't be parsed as an integer - say an LLM spat out "seventeen" or a blank field - it silently returns 0 instead of raising an error.

    That silent fallback cuts both ways. It's what keeps an agentic pipeline from hard-crashing on a bad token, and it's also the trap: a typo that returns 0 can look like a deliberate seed or step count. When a run suddenly behaves like everything is zeroed, check what string actually reached the node.

    The inputs that matter

    There are only three you'll touch:

    • value (STRING, default "0") - the text to parse. This is the whole point; wire a generated string in here, or just type a number.
    • min / max (INT, default ±2³¹) - the clamp bounds. These are the reason the node is useful for samplers: a model that outputs steps = 150 into a sampler expecting a sane range gets capped the moment it goes out of bounds.

    The name field is a label, not logic - it doesn't affect the output. It exists so agentic workflows can tag which variable a node represents. Feel free to ignore it.

    The single INT output wires straight into seed, steps, batch_size, or any other integer input on a KSampler or loader.

    Install

    The pack is on ComfyUI Manager - search "PixelML ComfyUI Nodes" and install, then restart. Or clone it by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/PixelML/ComfyUI-PixelML-CustomNodes
    

    Then restart ComfyUI.

    One warning the README won't give you: the pack's requirements.txt pins diffusers==0.24.0 and lists boto3, httpx, and httpx-sse - but none of the shipped nodes actually import any of those. They only use PIL, numpy, torch, and requests, all of which ship with ComfyUI. If installing via Manager drags your diffusers down to 0.24.0 and breaks something else in your setup, you can safely uninstall or ignore that requirement; the input nodes run fine without it. The README's dependencies have clearly rotted behind the code.

    When you'd actually reach for it

    Reach for this one when a number enters your workflow as text. A prompt-gen or agent node returning a seed as a string, a spreadsheet row driving a batch, a URL parameter parsed mid-graph - all of those land here. If you're only ever typing numbers by hand, the core integer primitive does the same job with fewer moving parts, and you don't need this pack for that.

    Categorysd

    Inputs (4)

    NameTypeDefaultDescription
    nameSTRINGint_input
    valueSTRING0
    minINT-2147483648
    maxINT2147483647

    Outputs (1)

    NameTypeDescription
    INTINT