Share Screen ๐๐ ฉ๐
Pipe your live screen, window, or webcam into ComfyUI
- image_base64
- default_image
- image
- prompt
- weight
- seed
If you've seen the "real-time webcam filter" style workflows - camera feed goes in, LCM or a similarly fast sampler redraws it a few times a second, stylized video comes out - the piece those setups need is a way to get a live image source into the graph instead of a static upload. Share Screen is zfkun's answer: it grabs frames straight from your browser's screen-share, window-share, or camera APIs and feeds them into ComfyUI as a live IMAGE output, alongside a prompt/weight/seed bundle you can drive downstream.
How it works
This one leans on your browser, not ComfyUI's backend. Click the node's capture control and your browser's native screen/window/camera picker pops up - same permission dialog you'd see sharing your screen on a video call. Once granted, frames stream in as base64 and the node re-emits the current frame as an IMAGE each time the graph runs, on whatever refresh interval you set. The README notes it supports multiple Share Screen nodes running at once and a custom clip-area crop, so you can capture just a region of a window rather than the whole thing.
The inputs and outputs that matter
image_base64(required) - this is the field the browser-side capture writes into; it's not something you manually fill in.default_image(optional, IMAGE) - a fallback image used if reading from the live source fails. Worth wiring something here so a dropped capture doesn't just kill your run.RGBA(optional, bool, default off) - export with alpha channel or not.prompt(optional, multiline STRING) andweight(optional, FLOAT, 0โ1, default 1) - the tooltips describe these as being for "further adjustments to the read image," i.e. a text/strength pair meant to travel downstream with the captured frame rather than get lost - useful if your sampler chain wants a prompt and a denoise-strength value alongside the image itself.seed(optional, INT, default 0) - likewise, for adjustments applied to the captured frame.
Outputs mirror that: image (the captured frame, wire it into your img2img/sampler chain), plus prompt, weight, and seed passed through so a downstream node can consume the whole bundle without you re-wiring four separate connections.
How to install it
Via ComfyUI Manager: search "ComfyUI_zfkun", install, restart. Manually:
cd ComfyUI/custom_nodes/
git clone https://github.com/zfkun/ComfyUI_zfkun
pip install -r requirements.txt
then restart. No model downloads - this is a browser-capture node, not something that needs weights.
Common issues & troubleshooting
The share picker never appears, or capture silently fails. Screen/camera/window capture are browser APIs (getDisplayMedia / getUserMedia), and browsers restrict them to secure contexts - localhost is fine, but if you're reaching ComfyUI over plain http:// on a remote box or a Tailscale IP, most browsers will refuse to grant access at all. Serve over HTTPS (or a reverse proxy that terminates TLS) if you're hitting this from anywhere other than the machine ComfyUI runs on.
You denied the permission prompt once and now it never asks again. Browsers remember a denial per-site. Check your browser's site permissions for the ComfyUI origin and reset screen/camera access manually.
The node keeps erroring instead of falling back. Wire something into default_image - without a fallback, a capture hiccup (window closed, permission revoked mid-session, tab backgrounded) can knock the run over instead of gracefully substituting an image.
This is the wrong tool if you just want to load a static image by path. Share Screen is specifically for live capture. If you're pulling frames a script already wrote to disk - say, from the pack's companion camera-capture server - you want Load Image Path instead, pointed at that file.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image_base64 | BASE64 | โ | |
| default_imageopt | IMAGE | Fallback image used when reading from the shared screen fails | |
| RGBAopt | COMBO | false | Whether to export the image in RGBA format |
| promptopt | STRING | Prompt for further adjustments to the read image | |
| weightopt | FLOAT | 1.000โ1 | Weight for further adjustments to the read image |
| seedopt | INT | 00โ18446744073709550000 | Random seed for further adjustments to the read image |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | โ |
| prompt | STRING | โ |
| weight | FLOAT | โ |
| seed | INT | โ |