ComfyUI Node

Smart Set Int

A hard integer override you can mute instead of rewire

By slvslvslv·Created 2 years ago·Updated 7 days ago· 3
Smart Set Int
    • output
    input0
    value0

    Smart Set Int is the integer twin of Smart Set Float, and it does exactly one thing: output value when the node is active, pass through input when it's bypassed. Two INT inputs, one INT output, no hidden tricks. It's the kind of node that looks pointless until you've spent ten minutes hunting down which seed or step count you overrode last week.

    The pattern is the same as the float version. Wire the "real" value from upstream into input, type the override you're experimenting with into value, and toggle between them by muting the node - right-click → Bypass, or Ctrl+B. When bypassed, input flows through untouched; when active, the output is hard-set to value. That turns the node into a visible, toggleable override you can park permanently in the graph. Leave it bypassed and it's invisible; flip it on and it takes control. You can see at a glance that steps, seed, batch size, or whatever integer is under test was being forced, which is more than you can say for a number typed directly into a widget.

    It's genuinely built well, too. The node declares itself lazy via check_lazy_status: when it's active, only value is evaluated, so the upstream of input doesn't run at all. No wasted computation on a branch you're not using. And because it's a passthrough when muted, you can insert it inline anywhere and it changes nothing until you want it to.

    Real-world use: seed toggling is the most common one. Put a Smart Set Int on the seed line with the live seed from a randomizer or previous node in input, put your "test this exact seed" number in value, and you can A/B a seed without touching the graph. Same story for step counts - compare 20 vs 30 vs 40 steps by muting different override nodes instead of editing a slider and re-queuing with your fingers crossed. Batch size, frame counts, CFG rounds... anything integer a sampler or loader accepts is fair game.

    It won't schedule values across a batch or animate per frame - that's a scheduler's job, not a manual override's. And there's no per-workflow persistence beyond the widget value itself. If you need more than on/off, look elsewhere.

    Install via ComfyUI Manager (search "Smart Helper Nodes"), or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/slvslvslv/ComfyUI-SmartHelperNodes
    

    Restart ComfyUI and it appears in the SmartHelperNodes category. The pack has zero pip dependencies - requirements.txt is empty - so there's nothing to resolve or break.

    CategorySmartHelperNodes

    Inputs (2)

    NameTypeDefaultDescription
    inputINT0Input value (used when node is bypassed)
    valueINT0Output value (used when node is active)

    Outputs (1)

    NameTypeDescription
    outputINT