mirror of
https://git.datalinker.icu/kijai/ComfyUI-KJNodes.git
synced 2025-12-09 21:04:41 +08:00
commit
adb35ee233
@ -496,6 +496,11 @@ Can be used for realtime diffusion with autoqueue.
|
||||
self.cap.release()
|
||||
self.current_cam_index = 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():
|
||||
raise Exception("Could not open webcam")
|
||||
|
||||
@ -1663,4 +1668,4 @@ class LoadAndResizeImage:
|
||||
if not folder_paths.exists_annotated_filepath(image):
|
||||
return "Invalid image file: {}".format(image)
|
||||
|
||||
return True
|
||||
return True
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user