tharms commited on
Commit
f7bc3eb
·
1 Parent(s): 6eaada8

UNDO: launch app with launch.py step 2/5/1

Browse files
Files changed (1) hide show
  1. launch.py +19 -19
launch.py CHANGED
@@ -1,29 +1,29 @@
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():
 
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():