lankaster/facefusion3.1
2
1import subprocess
2import os
3
4# Set the device to CPU explicitly
5device = "cpu"
6print("Using CPU")
7
8# Clone the repository
9subprocess.run(["git", "clone", "https://github.com/facefusion/facefusion", "--single-branch"], check=True)
10
11# Change directory to facefusion to run the UI
12os.chdir("facefusion")
13
14# Install dependencies for CPU mode
15subprocess.run(["python", "install.py", "--onnxruntime", "default", "--skip-conda"], check=True)
16
17# Run the UI in CPU mode
18subprocess.run(["python", "facefusion.py", "run", "--execution-providers", "cpu"], check=True)
19 