Spaces:
Runtime error
Runtime error
Update facefusion from 2.4.1 to 2.50
Browse files
app.py
CHANGED
|
@@ -3,18 +3,20 @@ import os
|
|
| 3 |
import torch
|
| 4 |
|
| 5 |
if torch.cuda.is_available():
|
|
|
|
| 6 |
print("Using GPU")
|
| 7 |
else:
|
|
|
|
| 8 |
print("Using CPU")
|
| 9 |
|
| 10 |
# Clone the repository
|
| 11 |
-
subprocess.run(["git", "clone", "https://github.com/facefusion/facefusion", "--branch", "2.
|
| 12 |
|
| 13 |
# chande directory to face fusion to run ui
|
| 14 |
os.chdir("facefusion")
|
| 15 |
|
| 16 |
# installation
|
| 17 |
-
subprocess.run(["python", "install.py", "--onnxruntime", "cuda-11.8", "--skip-
|
| 18 |
|
| 19 |
# Run the ui
|
| 20 |
-
subprocess.run(["python", "run.py", "--execution-providers", "cpu"], check=True)
|
|
|
|
| 3 |
import torch
|
| 4 |
|
| 5 |
if torch.cuda.is_available():
|
| 6 |
+
device="cuda"
|
| 7 |
print("Using GPU")
|
| 8 |
else:
|
| 9 |
+
device="cpu"
|
| 10 |
print("Using CPU")
|
| 11 |
|
| 12 |
# Clone the repository
|
| 13 |
+
subprocess.run(["git", "clone", "https://github.com/facefusion/facefusion", "--branch", "2.5.0", "--single-branch"], check=True)
|
| 14 |
|
| 15 |
# chande directory to face fusion to run ui
|
| 16 |
os.chdir("facefusion")
|
| 17 |
|
| 18 |
# installation
|
| 19 |
+
subprocess.run(["python", "install.py", "--onnxruntime", "cuda-11.8", "--skip-cuda"], check=True)
|
| 20 |
|
| 21 |
# Run the ui
|
| 22 |
+
subprocess.run(["python", "run.py", "--execution-providers", "cpu", {"cuda" if device=="cuda" else None}], check=True)
|