Update launch.py
Browse files
launch.py
CHANGED
@@ -1,9 +1,5 @@
|
|
1 |
from modules import launch_utils
|
2 |
import os
|
3 |
-
import subprocess
|
4 |
-
import threading
|
5 |
-
import logging
|
6 |
-
import sys
|
7 |
|
8 |
# 设置启动参数
|
9 |
args = launch_utils.args
|
@@ -16,6 +12,7 @@ args.multiple = True
|
|
16 |
args.no_download_sd_model = True
|
17 |
|
18 |
|
|
|
19 |
args = launch_utils.args
|
20 |
python = launch_utils.python
|
21 |
git = launch_utils.git
|
@@ -41,29 +38,17 @@ start = launch_utils.start
|
|
41 |
|
42 |
|
43 |
def main():
|
44 |
-
if args.
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
exit(0)
|
50 |
-
|
51 |
-
launch_utils.startup_timer.record("initial startup")
|
52 |
-
|
53 |
-
with launch_utils.startup_timer.subcategory("prepare environment"):
|
54 |
-
if not args.skip_prepare_environment:
|
55 |
-
prepare_environment()
|
56 |
|
57 |
if args.test_server:
|
58 |
configure_for_tests()
|
59 |
|
60 |
start()
|
61 |
|
|
|
62 |
|
63 |
if __name__ == "__main__":
|
64 |
main()
|
65 |
-
|
66 |
-
|
67 |
-
#START = True
|
68 |
-
#if START == True:
|
69 |
-
# main()
|
|
|
1 |
from modules import launch_utils
|
2 |
import os
|
|
|
|
|
|
|
|
|
3 |
|
4 |
# 设置启动参数
|
5 |
args = launch_utils.args
|
|
|
12 |
args.no_download_sd_model = True
|
13 |
|
14 |
|
15 |
+
|
16 |
args = launch_utils.args
|
17 |
python = launch_utils.python
|
18 |
git = launch_utils.git
|
|
|
38 |
|
39 |
|
40 |
def main():
|
41 |
+
if not args.skip_prepare_environment:
|
42 |
+
prepare_environment()
|
43 |
+
os.system(f"sed -i -e 's/dict()))/dict())).cuda()/g' {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 |
if args.test_server:
|
47 |
configure_for_tests()
|
48 |
|
49 |
start()
|
50 |
|
51 |
+
__name__ = "__main__"
|
52 |
|
53 |
if __name__ == "__main__":
|
54 |
main()
|
|
|
|
|
|
|
|
|
|