File size: 338 Bytes
693ea98
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
import subprocess
import os

# Set the device to CPU explicitly
print("Using CPU")

# Install dependencies for CPU mode
subprocess.run(["python", "install.py", "--onnxruntime", "default", "--skip-conda"], check=True)

# Run the UI in CPU mode
subprocess.run(["python", "facefusion.py", "run", "--execution-providers", "cpu"], check=True)