TEXT Switch OSC Control @ vrch.ai
Radio buttons for your prompts
- TEXT_OUTPUT
TEXT Switch OSC Control is what you want when you have a set of mutually exclusive choices and a finger. It holds up to eight text options, listens to a single OSC path, and whichever index your controller sends is the text you get out. It's the radio-button version of the pack's TEXT Key Control - instead of cycling with a key, you tap one of eight buttons and the selection jumps straight to it. No cycling through the whole list to get back to option one.
How it works
Set up text1 through text8 with your options - full prompts, style tags, system messages, whatever strings you're switching between. Then point the node at your OSC server with server_ip and port (8000 by default) and give it a single path (default /radio1). Your OSC client sends an integer index - 0 through 7 - to that path, and the node outputs the corresponding text as TEXT_OUTPUT.
One behavior worth knowing: if it receives an out-of-range index, it keeps the previous output rather than blanking out. That's defensive by design - a stray 9 from a misconfigured controller won't nuke your current selection mid-run. It does mean "garbage in, silence out," so if the node ever looks frozen, check what indices the client is actually sending.
This pairs naturally with TouchOSC's radio-button control, and the pack's bundled panel (comfyui_osc_control.tosc) is built to speak these paths on port 8000.
Where it fits
The pattern is: a tablet with eight buttons, each one a different look. Press "neon," you get the neon prompt; press "ink," you get the ink prompt. Because it's a single index rather than a toggle, it's the cleanest way to pick one of N presets - the node is stateless between messages, so there's no drift, no latched state, nothing to reset. Wire TEXT_OUTPUT into a CLIP Text Encode or a prompt builder and combine it with the pack's TEXT Concat OSC Control if you want a fixed preset plus live-added tags.
Installing it
Standard pack install:
- ComfyUI Manager → search ComfyUI Web Viewer → install.
- Manual:
Windows portable:cd ComfyUI/custom_nodes git clone https://github.com/VrchStudio/comfyui-web-viewer pip install -r requirements.txtpython_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\comfyui-web-viewer\requirements.txt. - Restart ComfyUI.
The python-osc dependency comes with the pack's requirements. First install is slow because that file also bundles the optional Music2Emotion stack; it doesn't touch this node, just let it finish.
Gotchas
The default server_ip of 172.17.0.2 is the author's Docker-bridge address - on a normal install, set it to 127.0.0.1 or your LAN IP or nothing will arrive. And mind the zero-based indexing: your OSC client sends 0 for the first text box, not 1. Get that backwards and every selection is off by one, which feels like the node is broken when it's just doing what you told it. Enable debug and the console will show you exactly what indices are landing.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| text1 | STRING | — | |
| text2 | STRING | — | |
| text3 | STRING | — | |
| text4 | STRING | — | |
| text5 | STRING | — | |
| text6 | STRING | — | |
| text7 | STRING | — | |
| text8 | STRING | — | |
| server_ip | STRING | 172.17.0.2 | — |
| port | INT | 80000–65535 | — |
| path | STRING | /radio1 | — |
| debug | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| TEXT_OUTPUT | STRING | — |