ComfyUI Node

Boolean List Hierarchy

Switches with a family tree

By TeutonicMepheles·Created 2 months ago·Updated 2 days ago· 0
Boolean List Hierarchy
    • Boolean 1
    • Boolean 2
    • Boolean 3
    • Boolean 4
    • Boolean 5
    • Boolean 6
    • Boolean 7
    • Boolean 8
    • Boolean 9
    • Boolean 10
    • Boolean 11
    • Boolean 12
    • Boolean 13
    • Boolean 14
    • Boolean 15
    • Boolean 16
    • Boolean 17
    • Boolean 18
    • Boolean 19
    • Boolean 20
    • Boolean 21
    • Boolean 22
    • Boolean 23
    • Boolean 24
    • Boolean 25
    • Boolean 26
    • Boolean 27
    • Boolean 28
    • Boolean 29
    • Boolean 30
    • Boolean 31
    • Boolean 32
    • Boolean 33
    • Boolean 34
    • Boolean 35
    • Boolean 36
    • Boolean 37
    • Boolean 38
    • Boolean 39
    • Boolean 40
    • Boolean 41
    • Boolean 42
    • Boolean 43
    • Boolean 44
    • Boolean 45
    • Boolean 46
    • Boolean 47
    • Boolean 48
    • Boolean 49
    • Boolean 50
    • Boolean 51
    • Boolean 52
    • Boolean 53
    • Boolean 54
    • Boolean 55
    • Boolean 56
    • Boolean 57
    • Boolean 58
    • Boolean 59
    • Boolean 60
    • Boolean 61
    • Boolean 62
    • Boolean 63
    • Boolean 64
    config_json[{"id": "boolean-default-1", "label": "Boolean 1", "value": false, "parent_id": null}]

    Plain Boolean List gives you a pile of independent switches. Boolean List Hierarchy gives you switches that depend on each other - up to 64 booleans arranged in a three-level tree (Root → child → grandchild), where a parent can cascade its state down to its children, siblings can exclude each other, and branches can require something from another branch before they're allowed on. If your workflow's logic looks like "if the upscale pass is on, then the detailer under it can also be on, but only if the LoRA group isn't", this is the node that makes that readable instead of a diagram of your own confusion.

    The practical framing: this is for when a flat list of toggles stops matching the structure of your workflow. A flat list can't express "this switch only makes sense when that one is on." The hierarchy can - and it can enforce it at the front-end level, so the UI dims or forces a child's state based on its ancestors, keeps one member of an exclusive group selected at a time, and holds cross-branch AND dependencies so a downstream branch only activates when every prerequisite is true.

    How it works

    The backend reads the whole tree from a config_json input (a socketless, hidden field that the front-end editor writes to the workflow), applies the hierarchy constraints, and emits one BOOLEAN per item on the fixed 64 outputs. The front-end (web/boolean_list_hierarchy.js and its model) owns the editing: it gives each entry a stable ID so your wires survive reordering - you can sort the tree, indent a child, promote it up a level, or delete a whole subtree recursively without the connected outputs going to the wrong socket. That stable-ID wire persistence is the difference between "rearrange my switches" and "re-wire my entire graph."

    The inputs and outputs that matter

    • config_json - internal tree state. Socketless and hidden; you'll normally never touch it directly, though you can inspect it to see what the editor saved. Defaults to a single Boolean 1 root item.
    • The 64 BOOLEAN outputs - wired to whatever consumes the switches, exactly like the flat Boolean List.

    Reach for this over plain Boolean List when two things are true: you have more than a handful of switches, and those switches have parent/child or mutual-exclusion relationships you're currently papering over with manual discipline.

    How to install it

    Part of the DAELab pack. ComfyUI Manager, search "ComfyUI-DAELab-Custom-Nodes-Library", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/TeutonicMepheles/ComfyUI-DAELab-Custom-Nodes-Library
    

    then restart. No models, no extra deps. It's a V3 node, so keep ComfyUI Core reasonably current (No module named 'comfy_api' in the log means update ComfyUI, not pip). And since the editing UI is front-end code, install the whole repo - the web/ directory is what makes the tree editor exist.

    Common issues & troubleshooting

    "I reordered my tree and the wires flipped." The stable-ID system is supposed to prevent exactly this, but it depends on the IDs being saved into the workflow. If you built the tree, then loaded the workflow in something that stripped node properties, the IDs regenerate and wires can land on different sockets. Save after editing.

    "A child switch is stuck." That's the cascade working as intended: a parent's off-state forces its descendants off, and an exclusive group locks out its other members. Check the ancestor's state and the group's exclusivity before assuming it's a bug.

    "I don't see the tree editor." This node's editor is front-end. If you cloned only the nodes/ directory instead of the whole repo, you'd get a backend node with no panel - install the full pack.

    Categoryutils/logic

    Inputs (1)

    NameTypeDefaultDescription
    config_jsonoptSTRING[{"id": "boolean-default-1", "label": "Boolean 1", "value": false, "parent_id": null}]

    Outputs (64)

    NameTypeDescription
    Boolean 1BOOLEAN
    Boolean 2BOOLEAN
    Boolean 3BOOLEAN
    Boolean 4BOOLEAN
    Boolean 5BOOLEAN
    Boolean 6BOOLEAN
    Boolean 7BOOLEAN
    Boolean 8BOOLEAN
    Boolean 9BOOLEAN
    Boolean 10BOOLEAN
    Boolean 11BOOLEAN
    Boolean 12BOOLEAN
    Boolean 13BOOLEAN
    Boolean 14BOOLEAN
    Boolean 15BOOLEAN
    Boolean 16BOOLEAN
    Boolean 17BOOLEAN
    Boolean 18BOOLEAN
    Boolean 19BOOLEAN
    Boolean 20BOOLEAN
    Boolean 21BOOLEAN
    Boolean 22BOOLEAN
    Boolean 23BOOLEAN
    Boolean 24BOOLEAN
    Boolean 25BOOLEAN
    Boolean 26BOOLEAN
    Boolean 27BOOLEAN
    Boolean 28BOOLEAN
    Boolean 29BOOLEAN
    Boolean 30BOOLEAN
    Boolean 31BOOLEAN
    Boolean 32BOOLEAN
    Boolean 33BOOLEAN
    Boolean 34BOOLEAN
    Boolean 35BOOLEAN
    Boolean 36BOOLEAN
    Boolean 37BOOLEAN
    Boolean 38BOOLEAN
    Boolean 39BOOLEAN
    Boolean 40BOOLEAN
    Boolean 41BOOLEAN
    Boolean 42BOOLEAN
    Boolean 43BOOLEAN
    Boolean 44BOOLEAN
    Boolean 45BOOLEAN
    Boolean 46BOOLEAN
    Boolean 47BOOLEAN
    Boolean 48BOOLEAN
    Boolean 49BOOLEAN
    Boolean 50BOOLEAN
    Boolean 51BOOLEAN
    Boolean 52BOOLEAN
    Boolean 53BOOLEAN
    Boolean 54BOOLEAN
    Boolean 55BOOLEAN
    Boolean 56BOOLEAN
    Boolean 57BOOLEAN
    Boolean 58BOOLEAN
    Boolean 59BOOLEAN
    Boolean 60BOOLEAN
    Boolean 61BOOLEAN
    Boolean 62BOOLEAN
    Boolean 63BOOLEAN
    Boolean 64BOOLEAN