Prepare release

This commit is contained in:
henryruhs 2024-12-23 18:16:34 +01:00
parent 35984ab3e4
commit 1db186bb62
2 changed files with 4 additions and 4 deletions

View File

@ -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'

View File

@ -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():