BBrother commited on
Commit
1561245
1 Parent(s): 84f86b6

Update no_logs_launch.py

Browse files
Files changed (1) hide show
  1. no_logs_launch.py +8 -4
no_logs_launch.py CHANGED
@@ -1,6 +1,6 @@
1
  from modules import launch_utils
2
  import os
3
- import subprocess
4
 
5
  args = launch_utils.args
6
  python = launch_utils.python
@@ -25,16 +25,20 @@ prepare_environment = launch_utils.prepare_environment
25
  configure_for_tests = launch_utils.configure_for_tests
26
  start = launch_utils.start
27
 
 
28
  def main():
29
  if not args.skip_prepare_environment:
30
  prepare_environment()
31
- os.system(f"sed -i -e 's/dict()))/dict())).cuda()/g' {util_py_path}")
32
- os.system(f"sed -i -e 's/stable/dict()))/dict())).cuda()/g' /bushu/ui/repositories/diffusion-stability-stable/ldm/util.py")
 
33
 
34
  if args.test_server:
35
  configure_for_tests()
36
 
37
- start()
 
 
38
 
39
  if __name__ == "__main__":
40
  main()
 
1
  from modules import launch_utils
2
  import os
3
+
4
 
5
  args = launch_utils.args
6
  python = launch_utils.python
 
25
  configure_for_tests = launch_utils.configure_for_tests
26
  start = launch_utils.start
27
 
28
+
29
  def main():
30
  if not args.skip_prepare_environment:
31
  prepare_environment()
32
+ # 这里我用了一个特殊的参数/dev/null,它会把所有的输出都丢弃掉,相当于不输出任何东西
33
+ os.system(f"sed -i -e 's/dict()))/dict())).cuda()/g' {util_py_path} > /dev/null")
34
+ os.system(f"sed -i -e 's/stable/dict()))/dict())).cuda()/g' /bushu/ui/repositories/diffusion-stability-stable/ldm/util.py > /dev/null")
35
 
36
  if args.test_server:
37
  configure_for_tests()
38
 
39
+ # 这里我也用了/dev/null,把start函数的输出都忽略掉了
40
+ start() > /dev/null
41
+
42
 
43
  if __name__ == "__main__":
44
  main()