🌟 | Support this project |
---|---|
![]() |
bc1qs6qq0fkqqhp4whwq8u8zc5egprakvqxewr5pmx |
![]() |
0x3147bEE3179Df0f6a0852044BFe3C59086072e12 |
![]() |
TKznmR65yhPt5qmYCML4tNSWFeeUkgYSEV |
This is a project that provides the ability to take pictures with a smartphone camera and use them in the ComfyUI workflow
The project consists of two parts:
ComfyUI node
and
mobile application 📍
Note
The application was designed using the Reduce & Conquer architectural pattern
Platform | Minimal Version | Availability |
---|---|---|
Android | 8.0 (SDK 28) | ✅ |
iOS | - | ❌ |
- Configure
port
(default: 8090) - Turn
flashlight
on/off - Switch camera
lens facing
- Configure
port
(default: 8090) - Configure
timeout
(default: 10 seconds) - Get output as
image
,width
,height
The application consists of two parts: a camera for capturing images and an HTTP server. When a request is received, the server captures an image from the camera and returns it in JSON format.
The node performs port forwarding using adb, which allows you to connect to the server on your USB-connected smartphone via localhost. When the node is executed, an HTTP client is created that sends a request to the server running on the smartphone and then receives a response with a JSON file containing the image, its width and height.
Install adb on your computer. Make sure it is set in environment variables and can be called in command line
Install the Camera Capture application, which allows you to capture images from your smartphone camera
Clone comfyui-camera-capture-node repository into your
./ComfyUI/custom_nodes
folder, or download the latest release and place the comfyui-camera-capture-node
folder
there
Important
Make sure the port of the client and server match
- Connect your smartphone to your PC via USB
- Launch the
Camera Capture
application - Grant permission to use the smartphone camera
- If you see a preview of the camera, it is working
- Change the port if necessary
- Establish a connection to the server, making sure that it has a
Connected
state
- Find the category
camera
- Add a node
Camera Capture
to the workflow - Run the workflow
- If you get a black 512x512 image, check the console for an error