Compare commits

...

5 Commits

Author SHA1 Message Date
David Strouk 229d9ab4d5
Merge 647c5f250f into b1f610d432 2025-05-05 08:43:04 +08:00
Kenneth Estanislao b1f610d432
Update README.md 2025-05-05 08:30:44 +08: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
2 changed files with 13 additions and 3 deletions

View File

@ -32,7 +32,7 @@ Users are expected to use this software responsibly and legally. If using a real
## Exclusive v2.0 Quick Start - Pre-built (Windows) ## Exclusive v2.0 Quick Start - Pre-built (Windows)
<a href="https://deeplivecam.net/index.php/plans?plan_id=0&group_id=0"> <img src="media/Download.png" width="285" height="77" /> <a href="https://deeplivecam.net/index.php/quickstart"> <img src="media/Download.png" width="285" height="77" />
##### This is the fastest build you can get if you have a discrete NVIDIA or AMD GPU. ##### This is the fastest build you can get if you have a discrete NVIDIA or AMD GPU.

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