Nodes/ComfyUI Deploy/Image Websocket Input (ComfyDeploy)
ComfyUI Node

Image Websocket Input (ComfyDeploy)

Receive a live image from a web client — the input half of realtime ComfyUI

By BennyKok·Created 3 years ago·Updated 10 months ago· 1,529
Image Websocket Input (ComfyDeploy)
  • default_value
  • images
â—„input_idinput_idâ–º
â—„seed0â–º
â—„client_idâ–º

Pair this with the Image Websocket Output node and you've got the two halves of ComfyDeploy's realtime story. Where the output node streams images out to a web client, this one pulls images in: a browser or app sends an image over the websocket, keyed by an input_id, and this node turns it into an IMAGE tensor for the rest of your graph. It's the input that makes live painting demos work - you sketch on a canvas in the browser, the stroke image arrives here, and the workflow re-renders it in real time.

If you've seen the ComfyDeploy live-painting demo (the tldraw-style one that made the rounds on r/comfyui), this is the node sitting at the start of that workflow, right where the drawn image enters the graph. For interactive apps - inpainting on a canvas, realtime style transfer from a webcam frame, collaborative drawing - this is the socket that hands the pixels to the model.

How it works

The node checks a per-client metadata store keyed by client_id. If a websocket client has pushed an image for your input_id, it grabs that image, transposes EXIF orientation, converts to RGB, and returns it as a batch-of-one IMAGE tensor. If no image has arrived - or the client hasn't connected - it returns whatever you wired into default_value. That fallback matters: it's why the workflow still runs (with a placeholder) when a caller forgets to send an image, instead of crashing.

The inputs

  • input_id - the key the websocket message must use. Keep it short: it's validated to ASCII and 24 bytes max.
  • seed - a required INT, default 0. It's in the schema but the node just passes through; set it if your graph expects a seed from the input side.
  • default_value - optional IMAGE used when no websocket image is available.
  • client_id - optional; must match the client that's sending, or the lookup finds nothing and you get the default.

Output: a single images IMAGE tensor, ready for img2img, inpainting, or anything else that wants a source image.

Installing it

Same pack install as the rest:

cd ComfyUI/custom_nodes
git clone https://github.com/BennyKok/comfyui-deploy.git

Restart ComfyUI, or install "ComfyUI Deploy" from ComfyUI Manager. No model downloads, no API key. If you want a ready-made client to test with, the BennyKok/comfyui-deploy-next-example starter kit is the fastest path to seeing it actually stream.

Where people get burned

The most confusing bit is that the schema marks this as an output node even though it's obviously an input sink - ignore that flag, it's a quirk of how the pack registers websocket nodes. Don't let it make you think it produces UI output.

The real gotcha is the client_id handshake. The websocket client and this node must agree on client_id, and the image must be pushed under the exact input_id before the node executes. Get any of those wrong and you silently fall back to default_value, which looks like a "node not working" bug. Debug by checking the pack's console output - it prints whether it's returning the websocket image or the default.

Category🔗ComfyDeploy

Inputs (4)

NameTypeDefaultDescription
input_idSTRINGinput_id—
seedINT00–18446744073709550000—
default_valueoptIMAGE—
client_idoptSTRING—

Outputs (1)

NameTypeDescription
imagesIMAGE—