Nodes/ComfyUI Web Viewer/TEXT Key Control @ vrch.ai
ComfyUI Node

TEXT Key Control @ vrch.ai

Cycle up to eight prompts with a single key

By VrchStudio·Created 2 years ago·Updated 18 days ago· 356
TEXT Key Control @ vrch.ai
    • STRING
    text1
    text2
    text3
    text4
    text5
    text6
    text7
    text8
    skip_empty_optiontrue
    shortcut_keyF2
    current_value1
    enable_auto_switchfalse
    auto_switch_delay_ms1000

    If you've ever sat in front of ComfyUI rotating through prompt variations by hand-editing a CLIP Text Encode node, you know the friction: it's a copy-paste ritual, and it kills any sense of flow. TEXT Key Control from the ComfyUI Web Viewer pack replaces that ritual with one keypress. You store up to eight text options in the node, then tap an F-key to cycle through them while the graph runs. It's the keyboard version of "next preset," and it's the node I'd wire in first if you're doing live or semi-live generation with changing prompts.

    How it works

    The node holds eight text slots - text1 through text8, all multiline, so a whole prompt fits in each - and outputs the one you've currently selected as a STRING. Pressing your chosen shortcut_key (F1–F12, default F2) advances the selection and wraps around.

    The settings that shape the behavior:

    • skip_empty_option (default on) - jumps over empty slots when cycling. Leave it on unless you deliberately want blank slots as part of the rotation.
    • current_value - which of the eight slots is active, shown in the node as Value: X.
    • enable_auto_switch + auto_switch_delay_ms - cycles on a timer instead of on keypress. Set a delay in milliseconds and the node rotates prompts by itself. Handy for unattended flipbook-style runs, or a kiosk demo where you want variety without touching anything.

    The STRING output feeds anything prompt-ish: a CLIP Text Encode, a text-concat node, a prompt router, even an LLM node's system message. Because this is the Web Viewer pack, you can chain the output into TEXT Concat OSC Control if you want to combine the selected preset with live tags later.

    Installing it

    This is one node in the full pack, so the install is the same everywhere:

    1. In ComfyUI Manager, search for ComfyUI Web Viewer and install.
    2. Manual route:
      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.

    Nothing to download model-wise. The requirements.txt drags in the optional Music2Emotion stack (librosa, pytorch_lightning, numba) even though you'll never touch it, so the first install just takes a while. Let it finish.

    Where people get burned

    Same rule as every keyboard node in this pack: the ComfyUI browser tab has to be focused for the key to register. Alt-tab to anything else and your F2 is dead. It's a known limitation - the pack's docs say so, and there's a reddit thread where someone hit it trying to use Web Viewer key input in the background. Plan around it: keep the viewer focused, or use the enable_auto_switch timer when you can't guarantee focus.

    Two more notes. Browser shortcuts can steal your key - pick an F-key nothing else claims. And if you're cycling and the output doesn't seem to change, check current_value and make sure you actually populated the slot it lands on; an empty slot with skip_empty_option on just silently skips, which is correct behavior but easy to misread as a bug.

    For a live A/B prompt comparison, this plus the pack's instant queue is the whole rig. One key, new prompt, new frame.

    Categoryvrch.ai/control/keyboard

    Inputs (13)

    NameTypeDefaultDescription
    text1STRING
    text2STRING
    text3STRING
    text4STRING
    text5STRING
    text6STRING
    text7STRING
    text8STRING
    skip_empty_optionBOOLEANtrue
    shortcut_keyCOMBOF224 options: F1, F2, F3, F4, F5, F6, +18
    current_valueCOMBO18 options: 1, 2, 3, 4, 5, 6, +2
    enable_auto_switchBOOLEANfalse
    auto_switch_delay_msINT100050–10000

    Outputs (1)

    NameTypeDescription
    STRINGSTRING