BBrother commited on
Commit
cd397cf
1 Parent(s): 474e48a

Update launch.py

Browse files
Files changed (1) hide show
  1. launch.py +7 -20
launch.py CHANGED
@@ -38,25 +38,12 @@ prepare_environment = launch_utils.prepare_environment
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
- main()
 
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()