Nodes/Endless ️🌊✨ Nodes/Four Input Integer Switch (Widget)
ComfyUI Node

Four Input Integer Switch (Widget)

Four Integer Values, One Flick of the Switch

By tusharbhuttΒ·Created 3 years agoΒ·Updated about a year agoΒ· 68
Four Input Integer Switch (Widget)
    • INT
    β—„switch1β–Ί
    β—„int10β–Ί
    β—„int20β–Ί
    β—„int30β–Ί
    β—„int40β–Ί

    The Four Input Integer Switch (Widget) is a classic A/B/C/D switcher for whole numbers: you pre-fill four integer slots and use a little switch dial to pick which one comes out. It's the kind of node that sounds trivial and turns out to be quietly load-bearing - swap between step counts, resolutions, or seed values without editing four separate nodes.

    Widget vs. wired: the distinction that matters

    This is the "Widget" flavor, and the name is the whole story. In this version, the four values live as widgets directly on the node body - you type int1 through int4 into the boxes. The non-widget variant in the same pack (Four_Input_Int_Switch) accepts values from other nodes via connections instead. You can spot the difference instantly: the Widget version has no input sockets hanging off the int fields, because the fields themselves are where the values live.

    Why would you pick widgets over wired inputs? Speed and tidiness. When your switch values are constants - four step counts you test against, four CFG presets, four seed batches - typing them inline beats dragging four extra nodes onto the canvas. The trade-off: the values are frozen into the workflow, so if you want the numbers to come from somewhere dynamic (a scheduler, a randomizer), use the wired version or another pack's switch instead.

    Inputs and outputs

    • switch (INT, 1–4) - the selector. Set it to 1, 2, 3, or 4 and that's which input gets passed through. This is the only field you'll actually fiddle with during normal use.
    • int1–int4 (INT, optional) - the candidate values, all defaulting to 0. The source code treats any out-of-range switch value as a 0 output, so a switch of 0 or 5 silently returns 0 rather than erroring.

    INT output - the selected value. Wire it into any integer input: KSampler steps, Empty Latent Image width/height, a seed node. Since the output is a plain INT, it composes with everything.

    The honest review

    This is a single-author utility node from a hobby pack, and it shows in small ways - there's no visual highlight on the active input, no dropdown styling, nothing that makes it prettier than the stock equivalent. But it works exactly as advertised, it's got a sibling (Six and Eight input versions) if four isn't enough, and at this size it's hard to go wrong. If you already use rgthree or a similar power pack for switching, you probably don't need this. If you don't, it's a perfectly good no-frills switch.

    Installing the pack

    ComfyUI Manager (search Endless Nodes) or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/tusharbhutt/Endless-Nodes
    

    Restart ComfyUI and find it under Endless 🌊✨ β†’ Integer Switches. Pack-level caveat: single hobbyist author, GPL v3, no maintenance promises. For a node this simple that's an acceptable trade.

    CategoryEndless 🌊✨/Integer Switches

    Inputs (5)

    NameTypeDefaultDescription
    switchINT11–4β€”
    int1optINT0β€”
    int2optINT0β€”
    int3optINT0β€”
    int4optINT0β€”

    Outputs (1)

    NameTypeDescription
    INTINTβ€”