Enable venv on the fly

This commit is contained in:
henryruhs
2024-01-28 20:35:36 +01:00
parent f1c7b3d6c9
commit 6fb23fe747
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -1,15 +1,15 @@
#!/usr/bin/env python3
import subprocess
import sys
import subprocess
if __name__ == '__main__':
if 'venv' in sys.executable or 'conda' in sys.executable:
if 'venv' in sys.executable or '--skip-venv' in sys.argv:
from facefusion import core
core.cli()
else:
try:
subprocess.run([ 'venv/bin/python', 'run.py' ])
except KeyboardInterrupt:
except:
sys.exit()