Different PYTHONPATH for Windows and Linux/Mac

This commit is contained in:
cmdr2 2023-09-01 13:09:01 +05:30 committed by GitHub
parent 8e7a6077e5
commit 524612cee5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -250,6 +250,9 @@ def launch_uvicorn():
os.environ["SD_PATH"] = str(Path(Path.cwd(), "stable-diffusion"))
os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = "1"
if os_name == "Windows":
os.environ["PYTHONPATH"] = str(Path( os.environ["INSTALL_ENV_DIR"], "lib", "site-packages"))
else:
os.environ["PYTHONPATH"] = str(Path( os.environ["INSTALL_ENV_DIR"], "lib", "python3.8", "site-packages"))
os.environ["SD_UI_PATH"] = str(Path(Path.cwd(), "ui"))