Nodes/AK Pack/IsOneOfGroupsActive
ComfyUI Node

IsOneOfGroupsActive

Is any group in this family switched on?

By akawana·Created 9 months ago·Updated 8 days ago· 2
IsOneOfGroupsActive
    • boolean
    group_name_contains
    active_statefalse

    IsOneOfGroupsActive is a connection-free logic node for big graphs: it tells you whether any group whose name contains a substring you specify is currently enabled. Output is a single boolean - true if at least one matching group has an active (not muted, not bypassed) node inside it, false if they're all off. Wire that boolean into a branch selector or another logic node and you can make parts of your workflow respond to whether a whole feature group is switched on, with zero wires running across the canvas.

    The author's own pack is the audience here. His workflows run six to eight samplers with groups you mute and bypass to swap features in and out, and after a while you want one node that can ask "is the detail pass group even running?" without tracing wires through a maze. That's this node. It's in the same family as the pack's Repeat Group State, but where that node changes group state, this one only reports it.

    How it works - and where the magic lives. This is a two-layer node, and the important half is JavaScript. The bundled frontend extension watches the graph and, when you queue a run, finds every group whose title contains your group_name_contains text, checks whether any node inside any matching group is active, and stuffs the result into a hidden active_state widget. The Python side then just passes that value through as the output. That's why it feels instant and has no input sockets for group state - it reads the graph state directly from the UI.

    The inputs. group_name_contains (the substring; blank matches nothing) and active_state, which is a hidden widget you'll never set by hand - the JS fills it in. One output, boolean.

    How to install. ComfyUI Manager (search "AK Pack") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/akawana/ComfyUI-Utils-extra
    

    Restart ComfyUI. No dependencies, no models.

    Where people get burned. The substring match is loose on purpose: "Detail" matches groups named "Detail Pass", "Detailing", and "Refine Detailer" all at once. If you have overlapping names you'll get surprises, so be specific. Second, this is fundamentally a frontend node - the detection runs in the browser's JS, so headless/API-only execution can't update active_state, and the output depends on the web UI having run at queue time. And because "active" means "contains at least one non-muted, non-bypassed node," an empty group or one whose nodes are all bypassed reads as inactive even if the group itself looks enabled in the panel. Know what's inside your groups.

    CategoryAK/logic

    Inputs (2)

    NameTypeDefaultDescription
    group_name_containsSTRING
    active_stateBOOLEANfalse

    Outputs (1)

    NameTypeDescription
    booleanBOOLEAN