diff --git a/.gitignore b/.gitignore index d738af7..8877741 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ workflow/ gfpgan/ models/inswapper_128.onnx models/GFPGANv1.4.pth +*.onnx diff --git a/modules/metadata.py b/modules/metadata.py index d2843ea..9309bea 100644 --- a/modules/metadata.py +++ b/modules/metadata.py @@ -1,3 +1,3 @@ name = 'Deep Live Cam' -version = '1.0.1' +version = '1.3.0' edition = 'Portable' diff --git a/modules/processors/frame/face_swapper.py b/modules/processors/frame/face_swapper.py index 82662c2..4b4a222 100644 --- a/modules/processors/frame/face_swapper.py +++ b/modules/processors/frame/face_swapper.py @@ -17,7 +17,7 @@ NAME = 'DLC.FACE-SWAPPER' def pre_check() -> bool: download_directory_path = resolve_relative_path('../models') - conditional_download(download_directory_path, ['https://github.com/facefusion/facefusion-assets/releases/download/models/inswapper_128.onnx']) + conditional_download(download_directory_path, ['https://huggingface.co/hacksider/deep-live-cam/blob/main/inswapper_128_fp16.onnx']) return True @@ -39,7 +39,7 @@ def get_face_swapper() -> Any: with THREAD_LOCK: if FACE_SWAPPER is None: - model_path = resolve_relative_path('../models/inswapper_128.onnx') + model_path = resolve_relative_path('../models/inswapper_128_fp16.onnx') FACE_SWAPPER = insightface.model_zoo.get_model(model_path, providers=modules.globals.execution_providers) return FACE_SWAPPER diff --git a/modules/ui.py b/modules/ui.py index 4e3c7fa..049cd0f 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -257,11 +257,11 @@ def webcam_preview(): global preview_label, PREVIEW cap = cv2.VideoCapture(0) # Use index for the webcam (adjust the index accordingly if necessary) - cap.set(cv2.CAP_PROP_FRAME_WIDTH, 1280) # Set the width of the resolution - cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 720) # Set the height of the resolution + cap.set(cv2.CAP_PROP_FRAME_WIDTH, 640) # Set the width of the resolution + cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 480) # Set the height of the resolution cap.set(cv2.CAP_PROP_FPS, 60) # Set the frame rate of the webcam - PREVIEW_MAX_HEIGHT = 720 - PREVIEW_MAX_WIDTH = 1280 + PREVIEW_MAX_WIDTH = 640 + PREVIEW_MAX_HEIGHT = 480 preview_label.configure(image=None) # Reset the preview image before startup