ImagetoTD
The node that makes ComfyUI and TouchDesigner feel like one program
- images
ImagetoTD is the flagship of the ComfyUI-TD pack and almost certainly the first node you'll use. It takes IMAGE tensors from your graph and streams them over WebSocket into TouchDesigner, where the pack's ComfyUI2TD.tox component turns them into a TOP you can composite, shade, and send to a projector or screen. It's a reworked version of Acly's Send Image (WebSocket) node from comfyui-tooling-nodes - same idea, tuned for this pack's TD side.
This is the node that closes the loop for realtime work. Instead of rendering to a file and importing, the image arrives in TD the moment it's generated. That's the entire ComfyUI-TD promise: ComfyUI stops being a batch tool and becomes one stage of a live visual pipeline, the way ComfyUI's node graph already thinks in terms of data flow rather than form buttons.
How it works
Under the hood it's deceptively simple. Each tensor in the images batch is converted to a PNG via PIL, then pushed through ComfyUI's own binary preview-image event on the WebSocket - the same channel ComfyUI uses to show previews in the browser, repurposed so the tox can catch it. The tox parses it into a TOP. No temp files, no HTTP polling.
The useful side effect: the node iterates over the whole batch. So if you feed it a sequence of frames - say, every output of an animation or img2img loop - each frame ships across as its own TOP, and you effectively get a live video feed out of the other side. That's how people drive realtime visualizers and VJ setups with this thing.
The inputs
It's an output node - nothing comes out of it except into TD.
- images - the
IMAGEsocket. Wire up anything that produces images: a VAE decode, an upscaler, a masked region. - broadcast - off by default, meaning "send only to the client that queued the job." Turn it on when multiple WebSocket clients should receive the stream.
Install
Search ComfyUI-TD in ComfyUI Manager, or install by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/JiSenHua/ComfyUI-TD.git
Restart after. Manager handles the dependencies (trimesh, imageio-ffmpeg, soundfile, plyfile). You also need the ComfyUI2TD.tox component from the repo's tox folder, at v5.1.x or newer - the 5.1 refactor is what makes all of this work reliably, and older versions don't talk to these nodes.
Gotchas
If images run but TD stays empty, check the tox version and its WebSocket connection to ComfyUI first - that's where 90% of "nothing arrives" lives. If you're on a cloud ComfyUI or a slow network, images can drop; the pack's 5.1 rewrite fixed a lot of that, but for bandwidth-tight setups the pack has a purpose-built sibling, ImagetoTD(JPEG), that compresses before sending. And if you're doing a multi-client setup, remember broadcast defaults to off. The official tutorials are on Bilibili and in Chinese - follow along with the visuals and you'll be fine.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| broadcast | BOOLEAN | false | — |
Outputs (0)
No outputs