Update launch.py
Browse files
launch.py
CHANGED
@@ -15,7 +15,7 @@ args.gradio_queue = True
|
|
15 |
args.multiple = True
|
16 |
args.no_download_sd_model = True
|
17 |
|
18 |
-
|
19 |
python = launch_utils.python
|
20 |
git = launch_utils.git
|
21 |
index_url = launch_utils.index_url
|
@@ -38,12 +38,27 @@ prepare_environment = launch_utils.prepare_environment
|
|
38 |
configure_for_tests = launch_utils.configure_for_tests
|
39 |
start = launch_utils.start
|
40 |
|
41 |
-
if not args.skip_prepare_environment:
|
42 |
-
launch_utils.prepare_environment()
|
43 |
-
os.system(f"sed -i -e 's/dict()))/dict())).cuda()/g' {launch_utils.util_py_path}")
|
44 |
-
os.system(f"sed -i -e 's/stable/dict()))/dict())).cuda()/g' /bushu/ui/repositories/diffusion-stability-stable/ldm/util.py")
|
45 |
|
46 |
-
|
47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
|
49 |
-
|
|
|
|
|
|
15 |
args.multiple = True
|
16 |
args.no_download_sd_model = True
|
17 |
|
18 |
+
|
19 |
python = launch_utils.python
|
20 |
git = launch_utils.git
|
21 |
index_url = launch_utils.index_url
|
|
|
38 |
configure_for_tests = launch_utils.configure_for_tests
|
39 |
start = launch_utils.start
|
40 |
|
|
|
|
|
|
|
|
|
41 |
|
42 |
+
def main():
|
43 |
+
if args.dump_sysinfo:
|
44 |
+
filename = launch_utils.dump_sysinfo()
|
45 |
+
|
46 |
+
print(f"Sysinfo saved as {filename}. Exiting...")
|
47 |
+
|
48 |
+
exit(0)
|
49 |
+
|
50 |
+
launch_utils.startup_timer.record("initial startup")
|
51 |
+
|
52 |
+
with launch_utils.startup_timer.subcategory("prepare environment"):
|
53 |
+
if not args.skip_prepare_environment:
|
54 |
+
prepare_environment()
|
55 |
+
|
56 |
+
if args.test_server:
|
57 |
+
configure_for_tests()
|
58 |
+
|
59 |
+
start()
|
60 |
+
|
61 |
|
62 |
+
START = True
|
63 |
+
if START == True:
|
64 |
+
main()
|