BBrother commited on
Commit
6d21685
1 Parent(s): 88695a8

Update launch.py

Browse files
Files changed (1) hide show
  1. launch.py +23 -8
launch.py CHANGED
@@ -15,7 +15,7 @@ args.gradio_queue = True
15
  args.multiple = True
16
  args.no_download_sd_model = True
17
 
18
- args = launch_utils.args
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
- if args.test_server:
47
- launch_utils.configure_for_tests()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
 
49
- launch_utils.start()
 
 
 
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()