Make it detect if its running on gpu and so launch it already in gpu else cpu
Browse files
app.py
CHANGED
@@ -19,4 +19,7 @@ os.chdir("facefusion")
|
|
19 |
subprocess.run(["python", "install.py", "--onnxruntime", "cuda-11.8", "--skip-conda"], check=True)
|
20 |
|
21 |
# Run the ui
|
22 |
-
|
|
|
|
|
|
|
|
19 |
subprocess.run(["python", "install.py", "--onnxruntime", "cuda-11.8", "--skip-conda"], check=True)
|
20 |
|
21 |
# Run the ui
|
22 |
+
if device=="cuda":
|
23 |
+
subprocess.run(["python", "run.py", "--execution-providers", "cpu"], check=True)
|
24 |
+
else:
|
25 |
+
subprocess.run(["python", "run.py", "--execution-providers", "cpu", "cuda"], check=True)
|