Nodes/ComfyUI Web Viewer/LATENT WebSocket Sender @ vrch.ai
ComfyUI Node

LATENT WebSocket Sender @ vrch.ai

Streaming your latents to another machine

By VrchStudio·Created 2 years ago·Updated 18 days ago· 356
LATENT WebSocket Sender @ vrch.ai
  • latent
  • LATENT
channel1
server172.17.0.2:8001
debugfalse

The WebSocket nodes in ComfyUI Web Viewer are how this pack talks to other machines in real time, and this one is the transmitter for the most interesting payload type: latents. VrchLatentWebSocketSenderNode takes a LATENT from anywhere in your graph and broadcasts it over a WebSocket channel so the matching loader on another machine can pick it up and sample it. In practice: your heavy generation box streams its latents out, and a second ComfyUI instance - or a browser viewer - turns them into images elsewhere.

What it does

The inputs are the standard realtime trio plus the payload itself:

  • latent - the LATENT you're sending. Wire this from a sampler, an encoder, or anywhere else latents flow.
  • server - the WebSocket server as host:port. The default 172.17.0.2:8001 is a Docker bridge IP from the developers' own containerized workflow; replace it with your relay or the peer machine you're sending to.
  • channel - one of 8 numbered channels (1–8). The receiver must match it.

The debug toggle shows you what's being sent, which is your first stop when nothing arrives on the other end. The node outputs LATENT as a passthrough and is an output node, so it terminates a branch - you're deliberately saying "this latent goes out, and also keeps flowing on."

Why send a latent instead of an image?

Because latents are the compressed representation - that's literally their job - so you're shipping a fraction of the data, and the receiving side can decode it in its own VAE rather than you doing the decode, encode, and re-decode dance. That saves a lossy round trip and is exactly the trick that matters when you're doing live, low-latency work across machines. It only works cleanly if both ends share a compatible latent space (same model family/VAE); mix SDXL latents into a Flux pipeline and you'll get noise, not an image.

Installing it

Shared with the whole pack:

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 to download; this node is pure plumbing.

Troubleshooting

Receiver stuck on its default latent? Verify server and channel match on both ends, then flip debug here and confirm the transmission is actually leaving. And if you're testing the pair on one machine before scaling out, load example_websocket_nodes_001_basic.json from the pack - it wires a sender and loader together so you can see the round trip work without a second computer in the loop. A quiet sender that thinks it's streaming while nobody listens is the classic failure mode; debug output is your truth serum.

Categoryvrch.ai/viewer/websocket

Inputs (4)

NameTypeDefaultDescription
latentLATENT
channelCOMBO18 options: 1, 2, 3, 4, 5, 6, +2
serverSTRING172.17.0.2:8001
debugBOOLEANfalse

Outputs (1)

NameTypeDescription
LATENTLATENT