Spaces:
Running
Running
| #!/usr/bin/env python3 | |
| import os | |
| import sys | |
| 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 | |
| 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() |