Nodes/ComfyUI-Interactive/Integer (for Interactive)
ComfyUI Node

Integer (for Interactive)

A plain int literal built to play nice with interactive workflows

By lquesada·Created 2 years ago·Updated about a year ago· 52
Integer (for Interactive)
    • integer
    integer0

    On the surface InteractiveInteger is nothing special - it's a widget with a number in it, and an INT output. ComfyUI already has a primitive node that does that. The reason this one exists instead is context: the pack's own docs describe it as one of a small set of literal nodes ("String," "Integer," "Float," all "for Interactive") meant specifically to define values that "pass through different triggers" cleanly inside an interactive workflow - the kind of workflow built around InteractiveSelector, InteractiveSwitch, and manual re-execution rather than a straight linear run.

    The practical upshot: use this instead of a generic primitive node wherever an integer value needs to travel through the parts of your graph that pause and wait on a click, especially feeding an InteractiveSelectorWithParameters node's parameter_int input.

    How it works

    There's no logic to speak of. You set a number in the widget; it comes out the other side as an INT, unchanged, every time the node executes. Where it actually matters is what you attach it to - most commonly, one InteractiveInteger per branch of a multi-way choice, each holding a different value (a different step count, a different batch size, whatever you want to travel with that specific candidate), feeding into that branch's InteractiveSelectorWithParameters as its parameter_int. Pick a branch and its integer comes along with it, released downstream by the matching InteractiveSwitchWithParameters.

    The inputs and outputs that matter

    • integer (required, INT, default 0) - the value itself. Set it directly in the widget.
    • integer (output, INT) - wire this wherever you'd wire any other INT source: a parameter_int on a selector, a sampler's step count, a batch size, anything that takes an integer.

    That's genuinely the whole node - one input, one output, same name on both sides.

    How to install it

    It ships as part of the full pack, not separately. Via ComfyUI Manager: search "ComfyUI-Interactive" and install. Or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/lquesada/ComfyUI-Interactive
    

    Restart ComfyUI after either. No requirements.txt to run, nothing to download.

    Common issues & troubleshooting

    Why not just use the built-in Primitive/INT node? You can, for a plain non-interactive part of your graph. The pack's own framing is that this node - and its String and Float siblings - are meant for values that need to survive being part of a paused, re-triggered execution correctly. If you're feeding a value into anything downstream of an InteractiveSelector/InteractiveSwitch pair, reach for this one rather than a generic primitive, on the theory that the author built it to match how this pack's execution model actually behaves.

    The value doesn't seem to update after I change it. Like the rest of this pack, interactive workflows need auto-enqueue off and an empty queue to behave predictably. If a run is mid-flight when you change the widget, it's easy to see a stale value from before your edit.

    I need this value to change per branch, not stay constant. That's the normal usage pattern - one InteractiveInteger per candidate branch, each set to a different number, rather than one shared node feeding all branches. Sharing one across branches just means every branch gets the same value, which defeats the point of tying it to a specific choice.

    Categoryinteractive

    Inputs (1)

    NameTypeDefaultDescription
    integerINT0

    Outputs (1)

    NameTypeDescription
    integerINT