JSON WebSocket Channel Loader @ vrch.ai
Receiving JSON from another machine, live
- JSON
The ComfyUI Web Viewer pack is built around real-time interaction - think live VJ sets and interactive installations rather than batch renders. The WebSocket nodes are the pack's remote-control layer: they let one machine push data to another over the network, live. This node is the listener side for JSON: it connects to a WebSocket channel and emits whatever JSON arrives on it as a JSON output.
What it does
Three inputs matter here:
server- the WebSocket server address, inhost:portform. The default is172.17.0.2:8001, and that IP should look suspicious to you: it's a Docker bridge address, a giveaway that this pack was developed against a containerized setup and that you'll almost certainly need to change it to your own relay, another machine on your network, or a public endpoint.channel- which of the 8 numbered channels (1–8) to subscribe to. Senders and listeners have to agree on the channel for data to flow.default_json_string- the fallback JSON used if nothing has arrived on the channel yet, so your workflow doesn't sit there spitting empty objects. Defaults to{}.
There's also a debug toggle for seeing what's happening under the hood. The node is an output node, so it's the end of a branch: take that JSON and feed it into prompt building, logic, or whatever consumes it.
How to think about it
The key mental model: this is a receive node, so something else has to be sending. That's usually a VrchJsonWebSocketSenderNode on another machine, or your own script pushing JSON to the same server and channel. If you're just testing on one machine, the pack's example workflow (example_websocket_nodes_001_basic.json) shows sender and loader paired up so you can see the round trip before you involve a second computer. Don't expect it to work out of the box with the default Docker IP - point it at the actual server, and if nothing arrives, check that sender and receiver share both the server and the channel number.
Installing it
It's part of the ComfyUI Web Viewer pack, so the install is shared with every node in this article set:
cd ComfyUI/custom_nodes
git clone https://github.com/VrchStudio/comfyui-web-viewer
pip install -r comfyui-web-viewer/requirements.txt
Or search ComfyUI Web Viewer in ComfyUI Manager and restart. No models, no heavy dependencies - the optional Music2Emotion submodule is only for the audio emotion node.
Troubleshooting
If your JSON output stays at the default_json_string, you're connected but nothing is landing on the channel - double-check the channel number and that a sender is actually running. If the node errors, the server address is the first suspect; remember it's the address of the WebSocket server, not your ComfyUI box's usual 8188 port.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| channel | COMBO | 1 | 8 options: 1, 2, 3, 4, 5, 6, +2 |
| server | STRING | 172.17.0.2:8001 | — |
| debug | BOOLEAN | false | — |
| default_json_stringopt | STRING | {} | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| JSON | JSON | — |