BBrother commited on
Commit
4e4c7ac
1 Parent(s): 6fe475d

Update launch.py

Browse files
Files changed (1) hide show
  1. launch.py +5 -5
launch.py CHANGED
@@ -39,6 +39,10 @@ start = launch_utils.start
39
 
40
  util_py_path = '/bushu/ui/repositories/diffusion-stability-stable/ldm/util.py'
41
 
 
 
 
 
42
  # 创建一个线程,用于实时查找并打印链接
43
  def find_and_print_links():
44
  while True:
@@ -51,12 +55,8 @@ def find_and_print_links():
51
  log_file.write(line)
52
  log_file.flush()
53
 
54
- # 打开日志文件以写入程序的所有输出
55
- log_file_path = '/bushu/logs_run.txt'
56
- log_file = open(log_file_path, 'w')
57
-
58
  # 使用tee命令将程序的输出同时写入日志文件和进程管道
59
- tee_command = f"{python} -u -m tee {log_file_path}"
60
  log_process = subprocess.Popen(tee_command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, bufsize=1, universal_newlines=True)
61
 
62
  def main():
 
39
 
40
  util_py_path = '/bushu/ui/repositories/diffusion-stability-stable/ldm/util.py'
41
 
42
+ # 打开日志文件以写入程序的所有输出
43
+ log_file_path = '/bushu/logs_run.txt'
44
+ log_file = open(log_file_path, 'w')
45
+
46
  # 创建一个线程,用于实时查找并打印链接
47
  def find_and_print_links():
48
  while True:
 
55
  log_file.write(line)
56
  log_file.flush()
57
 
 
 
 
 
58
  # 使用tee命令将程序的输出同时写入日志文件和进程管道
59
+ tee_command = f"{python} -u -m tee -a {log_file_path}"
60
  log_process = subprocess.Popen(tee_command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, bufsize=1, universal_newlines=True)
61
 
62
  def main():