Spaces:
Paused
Paused
UNDO: launch app with launch.py step 2/5/1
Browse files
launch.py
CHANGED
@@ -1,29 +1,29 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
|
5 |
-
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
|
16 |
-
|
17 |
|
18 |
-
|
19 |
-
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
|
25 |
-
|
26 |
-
|
27 |
|
28 |
|
29 |
def prepare_environment():
|
|
|
1 |
+
import os
|
2 |
+
import ssl
|
3 |
+
import sys
|
4 |
|
5 |
+
print('[System ARGV] ' + str(sys.argv))
|
6 |
|
7 |
+
root = os.path.dirname(os.path.abspath(__file__))
|
8 |
+
sys.path.append(root)
|
9 |
+
os.chdir(root)
|
10 |
|
11 |
+
os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = "1"
|
12 |
+
os.environ["PYTORCH_MPS_HIGH_WATERMARK_RATIO"] = "0.0"
|
13 |
+
if "GRADIO_SERVER_PORT" not in os.environ:
|
14 |
+
os.environ["GRADIO_SERVER_PORT"] = "7865"
|
15 |
|
16 |
+
ssl._create_default_https_context = ssl._create_unverified_context
|
17 |
|
18 |
+
import platform
|
19 |
+
import fooocus_version
|
20 |
|
21 |
+
from build_launcher import build_launcher
|
22 |
+
from modules.launch_util import is_installed, run, python, run_pip, requirements_met, delete_folder_content
|
23 |
+
from modules.model_loader import load_file_from_url
|
24 |
|
25 |
+
REINSTALL_ALL = False
|
26 |
+
TRY_INSTALL_XFORMERS = False
|
27 |
|
28 |
|
29 |
def prepare_environment():
|