mirror of
https://github.com/hacksider/Deep-Live-Cam.git
synced 2026-06-06 12:33:54 +02:00
Merge branch 'main' of https://github.com/hacksider/Deep-Live-Cam
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<h1 align="center">Deep-Live-Cam 2.0.3c</h1>
|
||||
<h1 align="center">Deep-Live-Cam 2.0.4c</h1>
|
||||
|
||||
<p align="center">
|
||||
Real-time face swap and video deepfake with a single click and only a single image.
|
||||
|
||||
@@ -44,11 +44,21 @@ models_dir = os.path.join(
|
||||
)
|
||||
|
||||
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(
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user