Nodes/radiance/Preview Server
ComfyUI Node

Preview Server

Watch a render from another machine's browser

By FXTD-Studios·Created 8 months ago·Updated about 18 hours ago· 246
Preview Server
  • images
  • passthrough
  • server_url
◄port8765►
◄stream_nameradiance►
◄jpeg_quality85►
◄resize_width0►
◄enabledtrue►

Preview Server publishes a frame over HTTP so any browser on your network can look at it. Point a client, a phone, another workstation, whatever at http://<host>:8765/frame/<stream_name> and it updates as the graph runs. The page auto-refreshes about once a second, so it's not a video stream - it's a "is this thing still going and does it look broken" monitor, which is the honest use case.

That's a more useful node than it sounds if your ComfyUI box is headless or sitting in another room. And there's a second, sneakier use: it's a stable URL you can point at from outside ComfyUI - a Stream Deck, an OBS browser source, a dashboard. It's a plain GET returning a JPEG, so almost anything can consume it.

What it serves

images is required and takes the batch, but only the last frame is published, clamped to [0, 1] and encoded as an 8-bit JPEG. If you're expecting the whole sequence to be browsable, that's not this node; one frame, latest wins.

port defaults to 8765 and takes 1024–65535. stream_name defaults to radiance and is the path segment: /frame/radiance. Multiple named streams can share one port, which is the polite design - run one Preview Server per branch of your graph, give each a name, keep them on 8765, and watch them all in different tabs.

The optional fields are all about making it cheap over a network. jpeg_quality (20–99, default 85) trades bytes for fidelity; resize_width (0–3840, default 0 = untouched) is the one to actually use if you're watching over wifi from a phone, since pushing a 4K JPEG every second is a silly amount of traffic for a sanity check. enabled off skips publishing this frame - and note the exact behaviour, because it's the kind of thing that confuses people: a server that has already started keeps running and keeps serving the previous frame. It doesn't stop, and it doesn't go blank.

Outputs are passthrough, the images unchanged so you can keep chaining, and server_url, the string you'd paste into a browser. Wire server_url into a note or a text overlay node if you're tired of remembering ports.

Mechanically this is an aiohttp route registered against ComfyUI's own server, in a background daemon thread that survives between graph executions. It only needs to start once per port - the source is explicit about that, and about tearing down an old server on a different port when you edit the port widget, so you don't leak listeners while you're fiddling.

Install

Ships with Radiance. ComfyUI Manager → search Radiance → install → restart → refresh. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/fxtd-studios/radiance.git
cd radiance
python -m pip install -r requirements.txt

Pillow does the JPEG encoding, and Pillow>=10.0.0 is already in requirements.txt. If Pillow is somehow missing the node doesn't crash - it returns the image with a server_url string that says ERROR: Pillow not installed - cannot serve JPEG, which is a nice piece of defensive design and a confusing thing to see if you only look at the picture.

Where people get burned

  • Not reachable from the other machine. 8765 is a local TCP port. Windows Firewall blocks it by default, and ComfyUI's launch flag --listen governs ComfyUI's own port, not this one. If localhost works and your laptop can't see it, it's the firewall.
  • Expecting video. ~1 fps refresh, one frame at a time. For actual playback use Write for a video file or the Viewer. The plumbing reason lives in comfyui-node-plumbing.md, but practically: this is a monitoring node, not an output format.
  • HDR frames. Everything is clamped to [0, 1] and gone to 8-bit JPEG. A tone-mapped or expanded SDR preview is the right thing to send here; a scene-linear EXR-style tensor gets clipped and will look wrong in a way that isn't the server's fault.
  • Watching a cached graph. If ComfyUI decided nothing changed, the node doesn't re-execute, so the frame doesn't refresh. Change something, or bump a control to force a run.
CategoryFXTD STUDIOS/Radiance/Review

Inputs (6)

NameTypeDefaultDescription
imagesIMAGEFrames to publish, returned unchanged on passthrough. Only the last frame is served, clamped to [0, 1] as an 8-bit JPEG.
portINT87651024–65535TCP port for the preview HTTP server.
stream_nameSTRINGradianceStream identifier. Access at /frame/<stream_name>.
jpeg_qualityoptINT8520–99JPEG compression quality (20=small, 99=lossless-ish).
resize_widthoptINT00–3840Resize frame before serving (0 = original size). Smaller = faster over network.
enabledoptBOOLEANtrueOff: skip publishing this frame. A server already started keeps running and serves the previous frame.

Outputs (2)

NameTypeDescription
passthroughIMAGE—
server_urlSTRING—