Webcam Input

ComfyUI can capture camera footage connected to your PC as an image.

Webcam Capture Node

    1. Add Webcam Capture node
    1. If the browser asks for permission to use the camera, please allow it.
    1. When you execute ▷ Run, the camera footage at that moment is output as an image.

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 Capture from + 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.
  • Canvas Size

    • Although not mandatory, matching the resolution generated by ComfyUI from SettingsVideo makes aspect ratio management easier.

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.

    1. Select OBS Virtual Camera from the camera selection dropdown
    • *If it does not appear, please reload ComfyUI (F5).
    1. 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.