Compare commits
3 Commits
9c2216319b
...
0f2b1afc1c
| Author | SHA1 | Date |
|---|---|---|
|
|
0f2b1afc1c | |
|
|
d0d90ecc03 | |
|
|
9f7e5273c4 |
|
|
@ -137,7 +137,7 @@ We highly recommend using a `venv` to avoid issues.
|
||||||
For Windows:
|
For Windows:
|
||||||
```bash
|
```bash
|
||||||
python -m venv venv
|
python -m venv venv
|
||||||
venv\Scripts\activate
|
source ./venv/bin/activate
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
```
|
```
|
||||||
For Linux:
|
For Linux:
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
name = 'Deep-Live-Cam'
|
name = 'Deep-Live-Cam'
|
||||||
version = '1.8'
|
version = '1.8.1'
|
||||||
edition = 'GitHub Edition'
|
edition = 'GitHub Edition'
|
||||||
|
|
|
||||||
|
|
@ -28,12 +28,14 @@ models_dir = os.path.join(
|
||||||
|
|
||||||
|
|
||||||
def pre_check() -> bool:
|
def pre_check() -> bool:
|
||||||
download_directory_path = abs_dir
|
download_directory_path = models_dir
|
||||||
|
model_url = "https://huggingface.co/hacksider/deep-live-cam/resolve/main/inswapper_128.onnx"
|
||||||
|
if "CUDAExecutionProvider" in modules.globals.execution_providers:
|
||||||
|
model_url = "https://huggingface.co/hacksider/deep-live-cam/resolve/main/inswapper_128_fp16.onnx"
|
||||||
|
|
||||||
conditional_download(
|
conditional_download(
|
||||||
download_directory_path,
|
download_directory_path,
|
||||||
[
|
[model_url],
|
||||||
"https://huggingface.co/hacksider/deep-live-cam/blob/main/inswapper_128_fp16.onnx"
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
@ -60,7 +62,10 @@ def get_face_swapper() -> Any:
|
||||||
|
|
||||||
with THREAD_LOCK:
|
with THREAD_LOCK:
|
||||||
if FACE_SWAPPER is None:
|
if FACE_SWAPPER is None:
|
||||||
model_path = os.path.join(models_dir, "inswapper_128_fp16.onnx")
|
model_name = "inswapper_128.onnx"
|
||||||
|
if "CUDAExecutionProvider" in modules.globals.execution_providers:
|
||||||
|
model_name = "inswapper_128_fp16.onnx"
|
||||||
|
model_path = os.path.join(models_dir, model_name)
|
||||||
FACE_SWAPPER = insightface.model_zoo.get_model(
|
FACE_SWAPPER = insightface.model_zoo.get_model(
|
||||||
model_path, providers=modules.globals.execution_providers
|
model_path, providers=modules.globals.execution_providers
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue