Nodes/ComfyUI-Aaalice-Nodes/🧭 Group Logic Probe
ComfyUI Node

🧭 Group Logic Probe

One boolean that decides whether a whole sampler branch actually runs

By Aaalice233·Created 2 months ago·Updated 10 days ago· 26
🧭 Group Logic Probe
    • Result

    The classic ComfyUI question: "I have three samplers in one workflow and I only want one of them to run, based on a condition." Newcomers reach for a Switch (Any) node and discover it picks which output you keep - but all three samplers still ran, and you just burned triple the time and VRAM. The honest fix is lazy branching: a node like Impact Pack's ImpactConditionalBranch only executes the branch it selects, so the losers never sample at all. What's been missing is a clean way to feed it "is this branch supposed to be on?" - and that's exactly what GroupLogicProbe outputs.

    It combines multiple visual-group probes into a single boolean with AND or OR logic, evaluated at the moment you hit Queue.

    How it works

    The node has no classic inputs and one output, Result (a BOOLEAN). All the configuration lives in its panel: you build a condition list where each row pairs a visual group with an expected state (enabled or disabled), then a mode toggle decides whether the rows combine as AND or OR.

    The mechanism is the interesting part. When you queue, the frontend snapshots every referenced group's member modes - it checks, right then, whether all the nodes in each group are muted or bypassed - and injects that snapshot into the node. The node just combines the snapshot into one boolean. No mid-execution polling, no guesswork.

    And it's deliberately honest about uncertainty. Group state is classified as enabled, disabled, mixed, empty, or missing. A row referencing a group you've since renamed or deleted highlights in the panel, and execution fails with a clear message rather than silently returning a wrong answer. Empty groups, same deal. It refuses to guess, which is the right call when the whole point is "should I spend GPU time here."

    What you wire it into

    The tooltip says it plainly: connect Result to a lazy conditional branch such as ImpactConditionalBranch's cond input. The not-selected branch's upstream nodes then never execute - that's what saves you the sampler time. Pair it with the pack's own QuickGroupManager (which gives you the group switches) and you get graphs that reconfigure themselves based on which groups are live, without you touching the canvas.

    Install

    Same pack as the rest of Aaalice's nodes:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Aaalice233/ComfyUI-Aaalice-Nodes.git
    cd ComfyUI-Aaalice-Nodes
    pip install -r requirements.txt
    

    or search ComfyUI-Aaalice-Nodes in ComfyUI Manager, then restart. No models, certifi is the only extra dependency.

    Gotchas

    • It doesn't skip anything by itself. You still need a lazy-conditional consumer like ImpactConditionalBranch; a plain "If" switch node that just selects output will not stop the losing samplers from running. This node only produces the boolean.
    • Like the rest of the pack's control nodes, it only sees visual groups in the current graph - it won't reach into subgraphs.
    • It's a V3-node pack, so it needs a recent ComfyUI; classic canvas and Nodes 2.0 work, App Mode doesn't.

    If you've been hand-wiring booleans into lazy branches or just accepting that all your samplers always run, this is the small node that closes the loop.

    CategoryAaalice/control

    Inputs (0)

    No inputs

    Outputs (1)

    NameTypeDescription
    ResultBOOLEANCombined probe result; connect to a lazy conditional branch such as ImpactConditionalBranch's cond.