Spaces:
Sleeping
Sleeping
File size: 573 Bytes
74f4dcc | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #!/usr/bin/env python3
import os
import sys
import gradio
os.environ['OMP_NUM_THREADS'] = '2' # Adjust based on CPU cores (e.g., 4 for quad-core)
os.environ['OPENBLAS_NUM_THREADS'] = '1' # Prevents thread contention
os.environ['MKL_NUM_THREADS'] = '1' # For Intel MKL libraries
print("gradio version:", gradio.__version__)
from facefusion import core
if __name__ == '__main__':
if len(sys.argv) == 1:
sys.argv.extend([
"run",
"--execution-providers", "cpu", # Force CPU-only mode
])
core.cli() |