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/pull/1189/head
parent
532e7c05ee
commit
b7e011f5e7
|
@ -28,11 +28,17 @@ 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
|
||||||
|
os.makedirs(download_directory_path, exist_ok=True)
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
Loading…
Reference in New Issue