Screen Live Input Stream
Pipe Any Window (or Your Whole Screen) Into a Workflow
- image
- IMAGE
This is the node that turns any part of your screen into a live IMAGE for your graph. Want ComfyUI to enhance a drawing while you're still making it? Capture the drawing app's window, run it through a pipeline, and let the model redraw or upscale it in near-real-time. That's literally the use case the author gives in the announcement, and it's the one this node nails.
The classic version of this trick - the Google Maps → anime workflows that were everywhere in 2024 - used the old toyxyz test nodes to grab a screen region into a ControlNet canny pass. This is the modern take: same idea, live preview, cropping built in, and a maintained repo.
How it works
Like the webcam node in this pack, the capture is entirely browser-side. The Python class is a thin LoadImage subclass; the front-end JavaScript calls getDisplayMedia - the same API browsers use for screen-sharing to video calls - to grab your monitor, a window, or a tab. Frames get drawn to a canvas, trimmed, uploaded as PNGs to ComfyUI's temp storage, and fed back through the LoadImage path, with IS_CHANGED forcing the graph to re-run as frames arrive.
The first click is yours: the node shows a Start Capture button, and clicking it pops the browser's native screen-share picker. That picker is where you actually choose between a monitor, a specific window, or a browser tab - the display_surface widget is a preference, and the node syncs the widget to whatever you actually picked from the dialog.
The inputs that matter
- display_surface - the enum (
monitor,window,browser) that hints what you want to share. The real picker still asks; this just seeds the request. - desired_width / desired_height - default 1920×1080. As with the webcam node, these are ideal constraints, and the preview shows what you actually got.
- frame_rate - default 30, an ideal on the capture side. See the reality check below.
- trim_left / trim_right / trim_top / trim_bottom - pixels cut from each edge, applied before the frame is uploaded. Because it's applied in the live preview, you can crop the feed to just the region you care about - say, your canvas without the toolbars around it.
The image input is the DOM widget that renders the live, trimmed preview, and it also hosts the Start Capture button.
Wiring it up
Output is a single IMAGE, so it feeds anything image-shaped: VAEEncode, ControlNet preprocessors, IP-Adapter, or a preview node. The canonical setup is a screen capture → ControlNet → img2img sampler, which gives you the "AI redraws my screen as I work" effect. Keep the model small and the steps low if you want the lag to stay short.
Installing it
This is one of the painless ones. Either:
cd ComfyUI/custom_nodes
git clone https://github.com/wouterverweirder/comfyui_live_input_stream
...then restart ComfyUI, or search "ComfyUI Live Input Stream" in ComfyUI Manager. No extra pip packages (the pack declares zero runtime dependencies - everything it touches, ComfyUI already ships), no model files. This is the same install for the webcam and MJPEG nodes in the pack.
Where people get burned
- It's your browser's screen, not the server's. Run ComfyUI on a headless box and there's nothing to share there. The capture comes from whatever machine has the UI open - which is usually what you want, just know that's how it works.
- Sharing stops when the stream ends. Click "Stop sharing" in the browser's own overlay and the feed dies - the node swaps back to a Start Capture button so you can restart. Don't panic when the preview goes gray, that's the feature.
- Secure context required.
getDisplayMedianeeds HTTPS except onlocalhost. Remote access over plain HTTP will fail with a red error, same as the webcam node. - Frame rate is a ceiling, not a promise. Each frame is a full PNG upload plus your pipeline. The widget can ask for 30fps; the graph decides what you actually get. And every frame piles up as a temp PNG in ComfyUI's temp folder.
- Whole-monitor shares leak. If you share the full display, the model sees every window. Crop with trims or share a single window and save yourself the embarrassment when your chat app scrolls past something you'd rather the pipeline didn't memorize.
This is the node I'd reach for any "capture what I'm doing and feed it to a model" workflow. Just remember it's a few steps behind your screen, not a live mirror.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| desired_width | INT | 19201–16384 | — |
| desired_height | INT | 10801–16384 | — |
| frame_rate | INT | 301–120 | — |
| display_surface | COMBO | monitor | 3 options: monitor, window, browser |
| image | SCREEN_ADVANCED | — | |
| trim_left | INT | 00–16384 | — |
| trim_right | INT | 00–16384 | — |
| trim_top | INT | 00–16384 | — |
| trim_bottom | INT | 00–16384 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |