Nodes/ComfyUI-ZML-Image/ZML_双布尔开关
ComfyUI Node

ZML_双布尔开关

Two boolean switches in one node — declutter for the stubbornly simple

By zml-w·Created about a year ago·Updated 2 months ago· 218
ZML_双布尔开关
    • Boole
    • Boole
    Afalse
    Bfalse

    A node with two boolean toggles, A and B, that outputs both. That's the entire node. There's no logic inside it - no AND, no OR, no flip-flop. It exists for one reason: ComfyUI's base boolean node gives you one switch, and if you need two related switches (say, "enable second pass" and "enable refinement") you either stack two nodes or convert widgets to inputs and route them. This packs two independent switches into a single box so your graph stays readable.

    How it works

    The source is four lines of honesty: it takes A and B, and returns (A, B). Each toggle is a plain boolean widget, default off, and the two outputs are independent - flipping one never touches the other. What you wire them into is up to you: converted-to-input sockets on other nodes, boolean logic elsewhere in the pack, or a conditional gate. It's pure plumbing, in the most literal sense.

    The inputs

    • A - boolean, default false.
    • B - boolean, default false.

    Two outputs, both named Boole in the schema (yes, both of them - the pack reuses the name), one per input. Wire them to any BOOLEAN socket.

    Installing

    Same pack, same routine:

    cd ComfyUI/custom_nodes
    git clone https://github.com/zml-w/ComfyUI-ZML-Image
    

    then restart ComfyUI, or use ComfyUI Manager. No new dependencies, no models, nothing to configure. Translation patch at https://github.com/zml-w/ZZZ_ZML_English_Patch if you want English labels.

    The honest take

    This is a "convenience" node, and it's a category the ComfyUI ecosystem has strong opinions about. Stock ComfyUI already gives you booleans everywhere, and you can convert any widget to an input - so this node saves you maybe a node's worth of canvas space and nothing else. Where it genuinely helps: you want two switches that travel together in a shared workflow, or you're building in the ZML pack's logic corner (where booleans feed things like the Downstream Node Switch and text conditions) and want the switches clustered. If you find yourself using it as a glorified spacer, that's fine - that's what it is. Don't expect it to do anything clever, and you'll never be disappointed.

    The one thing to double-check when wiring: both outputs carry the same display name in the schema, so if you're reading a workflow's JSON you need to tell them apart by their A/B source, not the label. The canvas itself makes it obvious which is which.

    Categoryimage/ZML_图像/逻辑

    Inputs (2)

    NameTypeDefaultDescription
    ABOOLEANfalse
    BBOOLEANfalse

    Outputs (2)

    NameTypeDescription
    BooleBOOLEAN
    BooleBOOLEAN