Spaces:
Running
Running
File size: 555 Bytes
962014c ebc81de 60e78ea a8127f9 1ebe84f 298cb83 997b0cf 298cb83 a8127f9 1ebe84f a8127f9 5f091f6 a8127f9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import subprocess
import os
# Set the device to CPU explicitly
device = "cpu"
print("Using CPU")
# Clone the repository
subprocess.run(["git", "clone", "https://github.com/facefusion/facefusion", "--single-branch"], check=True)
# Change directory to facefusion to run the UI
os.chdir("facefusion")
# 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) |