Nodes/JPS Custom Nodes for ComfyUI/Enable Disable Switch (JPS)
ComfyUI Node

Enable Disable Switch (JPS)

Drive an enable/disable widget from the same number that controls your other switches

By JPS-GER·Created 3 years ago·Updated 2 years ago· 100
Enable Disable Switch (JPS)
    • enable_disable
    select1
    compare1
    match

    Plenty of ComfyUI nodes have a widget that isn't a number or a boolean but a literal enable/disable dropdown - the KSampler's own advanced options and various sampling-utility nodes use this pattern. That's awkward to drive programmatically, because most of the graph's logic runs on plain integers, and this node is the small bridge that connects the two: it turns a numeric comparison into an enable/disable value you can actually wire into one of those widgets.

    It takes two integers, select and compare (both ranging 1–9), and a match setting that's either "Set to Enable" or "Set to Disable." When select equals compare, the node outputs whatever match is set to; when they don't match, it outputs the opposite. The single output, enable_disable, is a dedicated type that only ever carries the values enable or disable - exactly the vocabulary those specific node widgets expect.

    Why this shape, specifically. The whole point is synchronization. Say you're driving several of JPS's other switches - Model Switch, Conditioning Switch, Latent Switch - off one shared select value elsewhere in your graph, so picking "3" flips all of them to branch 3 at once. If part of that branch also needs to flip an enable/disable-style widget on some other node (turning a LoRA or an effect on only when that branch is active), you can't wire a plain integer into it - the widget won't accept it. Set this node's compare to the branch number that widget should be "on" for, point select at the same shared value driving your other switches, and now that one widget stays in sync with everything else without a separate manual toggle to remember. It's glue, but it's the glue that keeps a multi-branch workflow from drifting out of sync with itself.

    Installing it. Through ComfyUI Manager (search "JPS Custom Nodes for ComfyUI"), or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/JPS-GER/ComfyUI_JPS-Nodes.git
    

    Restart ComfyUI and find it under JPS Nodes/Switches. If you're reinstalling over an older copy of the pack, remove that first - the author explicitly warns that two overlapping installs collide on class names. No models involved, no extra dependencies.

    Troubleshooting. The main way this node confuses people is exactly the comparison logic itself: it's easy to assume select and compare work like a simple on/off flag, when actually the output flips depending on whether the two numbers match, not on either number's value alone. If your enable/disable output isn't doing what you expect, trace through manually: is select currently equal to compare? If yes, you get match; if no, you get the opposite of match. Also double-check what's actually accepting the enable_disable output - it's a specific custom type, not a generic string or boolean, so it only wires into node inputs built to expect exactly that (KSampler-style enable/disable widgets and a handful of other nodes in this same pack), and ComfyUI will refuse the connection if you try to plug it into something that wants a plain boolean or string instead.

    CategoryJPS Nodes/Switches

    Inputs (3)

    NameTypeDefaultDescription
    selectINT11–9
    compareINT11–9
    matchCOMBO2 options: Set to Enable, Set to Disable

    Outputs (1)

    NameTypeDescription
    enable_disableenable,disable