diff --git a/facefusion/metadata.py b/facefusion/metadata.py index 421da159..eea6629f 100644 --- a/facefusion/metadata.py +++ b/facefusion/metadata.py @@ -4,7 +4,7 @@ METADATA =\ { 'name': 'FaceFusion', 'description': 'Industry leading face manipulation platform', - 'version': 'NEXT', + 'version': '3.1.0', 'license': 'MIT', 'author': 'Henry Ruhs', 'url': 'https://facefusion.io' diff --git a/facefusion/uis/components/webcam.py b/facefusion/uis/components/webcam.py index 8658767b..46ba38db 100644 --- a/facefusion/uis/components/webcam.py +++ b/facefusion/uis/components/webcam.py @@ -27,15 +27,15 @@ WEBCAM_START_BUTTON : Optional[gradio.Button] = None WEBCAM_STOP_BUTTON : Optional[gradio.Button] = None -def get_webcam_capture(index : int) -> Optional[cv2.VideoCapture]: +def get_webcam_capture(webcam_device_id : int) -> Optional[cv2.VideoCapture]: global WEBCAM_CAPTURE if WEBCAM_CAPTURE is None: cv2.setLogLevel(0) if is_windows(): - webcam_capture = cv2.VideoCapture(index, cv2.CAP_DSHOW) + webcam_capture = cv2.VideoCapture(webcam_device_id, cv2.CAP_DSHOW) else: - webcam_capture = cv2.VideoCapture(index) + webcam_capture = cv2.VideoCapture(webcam_device_id) cv2.setLogLevel(3) if webcam_capture and webcam_capture.isOpened():