mirror of
https://git.datalinker.icu/kijai/ComfyUI-KJNodes.git
synced 2025-12-10 05:15:05 +08:00
commit
adb35ee233
@ -496,6 +496,11 @@ Can be used for realtime diffusion with autoqueue.
|
|||||||
self.cap.release()
|
self.cap.release()
|
||||||
self.current_cam_index = cam_index
|
self.current_cam_index = cam_index
|
||||||
self.cap = cv2.VideoCapture(cam_index)
|
self.cap = cv2.VideoCapture(cam_index)
|
||||||
|
try:
|
||||||
|
self.cap.set(cv2.CAP_PROP_FRAME_WIDTH, width)
|
||||||
|
self.cap.set(cv2.CAP_PROP_FRAME_HEIGHT, height)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
if not self.cap.isOpened():
|
if not self.cap.isOpened():
|
||||||
raise Exception("Could not open webcam")
|
raise Exception("Could not open webcam")
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user