Compare commits

...

8 Commits

Author SHA1 Message Date
padawan40 bf5ee0d2bf
Merge 677a4dd096 into fc86365a90 2025-07-04 03:24:02 +08:00
Kenneth Estanislao fc86365a90 Delete .yml 2025-07-02 18:37:10 +08:00
Kenneth Estanislao 1dd0e8e509
Create .yml 2025-07-02 18:29:32 +08:00
Kenneth Estanislao 4e0ff540f0
Update requirements.txt
faster and better requirements
2025-07-02 04:08:26 +08:00
padawan40 677a4dd096 Create .DS_Store 2025-05-13 21:16:10 +02:00
David Strouk 647c5f250f
Update modules/processors/frame/face_swapper.py
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
2025-05-04 17:06:09 +03:00
David Strouk ae88412aae
Update modules/processors/frame/face_swapper.py
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
2025-05-04 17:04:08 +03:00
David Strouk b7e011f5e7 Fix model download path and URL
- Use models_dir instead of abs_dir for download path
- Create models directory if it doesn't exist
- Fix Hugging Face download URL by using /resolve/ instead of /blob/
2025-05-04 16:59:04 +03:00
3 changed files with 15 additions and 5 deletions

BIN
.DS_Store vendored 100644

Binary file not shown.

View File

@ -28,11 +28,21 @@ models_dir = os.path.join(
def pre_check() -> bool: def pre_check() -> bool:
download_directory_path = abs_dir # Use models_dir instead of abs_dir to save to the correct location
download_directory_path = models_dir
# Make sure the models directory exists, catch permission errors if they occur
try:
os.makedirs(download_directory_path, exist_ok=True)
except OSError as e:
logging.error(f"Failed to create directory {download_directory_path} due to permission error: {e}")
return False
# Use the direct download URL from Hugging Face
conditional_download( conditional_download(
download_directory_path, download_directory_path,
[ [
"https://huggingface.co/hacksider/deep-live-cam/blob/main/inswapper_128_fp16.onnx" "https://huggingface.co/hacksider/deep-live-cam/resolve/main/inswapper_128_fp16.onnx"
], ],
) )
return True return True

View File

@ -4,7 +4,7 @@ numpy>=1.23.5,<2
typing-extensions>=4.8.0 typing-extensions>=4.8.0
opencv-python==4.10.0.84 opencv-python==4.10.0.84
cv2_enumerate_cameras==1.1.15 cv2_enumerate_cameras==1.1.15
onnx==1.16.0 onnx==1.18.0
insightface==0.7.3 insightface==0.7.3
psutil==5.9.8 psutil==5.9.8
tk==0.1.0 tk==0.1.0
@ -15,7 +15,7 @@ torch==2.5.1; sys_platform == 'darwin'
torchvision; sys_platform != 'darwin' torchvision; sys_platform != 'darwin'
torchvision==0.20.1; sys_platform == 'darwin' torchvision==0.20.1; sys_platform == 'darwin'
onnxruntime-silicon==1.21.0; sys_platform == 'darwin' and platform_machine == 'arm64' onnxruntime-silicon==1.21.0; sys_platform == 'darwin' and platform_machine == 'arm64'
onnxruntime-gpu==1.21.0; sys_platform != 'darwin' onnxruntime-gpu==1.22.0; sys_platform != 'darwin'
tensorflow; sys_platform != 'darwin' tensorflow; sys_platform != 'darwin'
opennsfw2==0.10.2 opennsfw2==0.10.2
protobuf==4.23.2 protobuf==4.25.1