Webcam Input
ComfyUI can capture camera footage connected to your PC as an image.
Webcam Capture Node

-
- Add
Webcam Capturenode
- Add
-
- If the browser asks for permission to use the camera, please allow it.
-
- When you execute
▷ Run, the camera footage at that moment is output as an image.
- When you execute
Capturing PC Screen Using OBS
Using the Virtual Camera function of OBS Studio, which is famous as streaming software, you can send the desktop screen or a specific window to ComfyUI as webcam footage.
It's more of an OBS feature than ComfyUI, but I'll introduce it because it's convenient.
1. OBS Settings
Install OBS and set up the screen you want to capture.
-
Source Settings (Window Capture)
- Select
Window Capturefrom+in Sources and specify a specific software (e.g., Paint). - Capture Method: If the screen is black, changing it to
Windows 10 (1903 or later)may make it appear (often happens with drawing software like Affinity). - Cursor: Uncheck "Capture Cursor" if you prefer.
- Select
-
Canvas Size
- Although not mandatory, matching the resolution generated by ComfyUI from
Settings→Videomakes aspect ratio management easier.
- Although not mandatory, matching the resolution generated by ComfyUI from
2. Start Virtual Camera
Click Start Virtual Camera in the Controls at the bottom right of OBS.
Now the OBS screen will be recognized as a webcam.
3. Loading in ComfyUI
Return to ComfyUI and change the settings of the Webcam Capture node.
-
- Select
OBS Virtual Camerafrom the camera selection dropdown
- *If it does not appear, please reload ComfyUI (
F5).
- Select
-
- When executed, the OBS screen is captured as an image.
Real-time Execution (Auto Queue)
Normal execution is fine if you just want to take one still image, but if you want to AI-convert your drawing in real-time, use Run (Instant) in the ▷ Run menu.