Nodes/ComfyUI Web Viewer/Trigger Toggle x8 @ vrch.ai
ComfyUI Node

Trigger Toggle x8 @ vrch.ai

Eight latched switches for the full control deck

By VrchStudio·Created 2 years ago·Updated about a month ago· 358
Trigger Toggle x8 @ vrch.ai
    • OUTPUT1
    • OUTPUT2
    • OUTPUT3
    • OUTPUT4
    • OUTPUT5
    • OUTPUT6
    • OUTPUT7
    • OUTPUT8
    • JSON
    initial_state1false
    initial_state2false
    initial_state3false
    initial_state4false
    initial_state5false
    initial_state6false
    initial_state7false
    initial_state8false
    debugfalse
    trigger1
    trigger2
    trigger3
    trigger4
    trigger5
    trigger6
    trigger7
    trigger8

    Trigger Toggle x8 is the whole latch bank in one node. Eight independent toggle channels, eight trigger inputs, eight boolean outputs, and a single JSON output that reports the state of all eight at once. It's the version you graduate to when the x4 stops being enough - which happens the moment you're driving a real interactive workflow and every branch of the graph wants its own switch.

    How it works

    Each channel is a self-contained T flip-flop, identical in spirit to the pack's single Trigger Toggle. trigger1 through trigger8 are the pulse inputs - feed one a true and its output flips. initial_state1 through initial_state8 set the starting position of each (all default OFF). The eight OUTPUT1OUTPUT8 booleans are completely independent; nothing about channel three can disturb channel seven.

    The JSON output is the part that scales: it mirrors all eight states in one structure, so a single wire can carry your entire switch deck to a logger, a status display in a web viewer, or any JSON-aware logic node. When you've got eight states, passing one bundle around beats routing eight booleans everywhere.

    Where it fits

    The obvious pairing is with the pack's SWITCH OSC Control, which gives you eight OSC toggles - but those are value-driven and reflect whatever the controller last sent. Feed them into this node's eight triggers and you get eight latched states: press a button on the tablet, the state flips and stays flipped until you press it again, regardless of what the controller does next. That's the difference between "controls that mirror the hardware" and "states that survive the hardware."

    Eight channels is enough to mute and enable every meaningful segment of a medium workflow - prompt branches, upscalers, LoRAs, viewers - and still have a couple spare for experiments.

    Installing it

    Standard pack install:

    1. ComfyUI Manager → search ComfyUI Web Viewer → install.
    2. Manual:
      cd ComfyUI/custom_nodes
      git clone https://github.com/VrchStudio/comfyui-web-viewer
      pip install -r requirements.txt
      
      Windows portable: python_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\comfyui-web-viewer\requirements.txt.
    3. Restart ComfyUI.

    No models, no config. First install is slow because the pack's requirements.txt also bundles the optional Music2Emotion stack - unrelated to this node, just let it finish.

    Gotchas

    The toggle rules scale too. Each triggerN is optional and default-empty: an unwired channel sits at its initial_state forever, which reads as a bug until you notice there's no wire. And these are pulse latches, not level followers - feed a channel a continuous high and it flips on one execution, flips back on the next. Send momentary pulses. If one channel ever seems possessed, debug mode will show you exactly what each trigger is receiving, and it's almost always a held-high signal or a missing connection.

    Categoryvrch.ai/logic

    Inputs (17)

    NameTypeDefaultDescription
    initial_state1BOOLEANfalse
    initial_state2BOOLEANfalse
    initial_state3BOOLEANfalse
    initial_state4BOOLEANfalse
    initial_state5BOOLEANfalse
    initial_state6BOOLEANfalse
    initial_state7BOOLEANfalse
    initial_state8BOOLEANfalse
    debugBOOLEANfalse
    trigger1optBOOLEAN
    trigger2optBOOLEAN
    trigger3optBOOLEAN
    trigger4optBOOLEAN
    trigger5optBOOLEAN
    trigger6optBOOLEAN
    trigger7optBOOLEAN
    trigger8optBOOLEAN

    Outputs (9)

    NameTypeDescription
    OUTPUT1BOOLEAN
    OUTPUT2BOOLEAN
    OUTPUT3BOOLEAN
    OUTPUT4BOOLEAN
    OUTPUT5BOOLEAN
    OUTPUT6BOOLEAN
    OUTPUT7BOOLEAN
    OUTPUT8BOOLEAN
    JSONJSON