ACCA225 commited on
Commit
ee41ca5
1 Parent(s): c53b4df

Update app11.py

Browse files
Files changed (1) hide show
  1. app11.py +4 -4
app11.py CHANGED
@@ -279,7 +279,7 @@ def start():
279
  #except Exception as e:
280
  # # 在这里处理异常的代码
281
  # print(f"proxy An error occurred: {e}")
282
- notbook()
283
  os.chdir("/home/xlab-app-center/stable-diffusion-webui/")
284
  try:
285
  while True:
@@ -296,7 +296,7 @@ def start():
296
  os.system(f"python launch.py --api --xformers --exit --enable-insecure-extension-access --gradio-queue --disable-safe-unpickle")
297
  #time.sleep(5)
298
 
299
- command = "python launch.py --api --api-auth=123456:5678 --xformers --ui-settings-file /home/xlab-app-center/config.json --ui-config-file /home/xlab-app-center/ui-config.json --gradio-queue --disable-safe-unpickle"
300
 
301
 
302
  #process = subprocess.Popen(command, shell=True)
@@ -307,13 +307,13 @@ def start():
307
  print(f"启动SD发生错误: {e}")
308
  # Create threads for each function
309
  wandb_thread = threading.Thread(target=monitor_gpu)
310
- #keepliving_thread = threading.Thread(target=session_saver)
311
  start_thread = threading.Thread(target=start)
312
 
313
  # Start the threads
314
  wandb_thread.start()
315
  start_thread.start()
316
- #keepliving_thread.start()
317
 
318
  # Wait for both threads to finish
319
  wandb_thread.join()
 
279
  #except Exception as e:
280
  # # 在这里处理异常的代码
281
  # print(f"proxy An error occurred: {e}")
282
+ #notbook()
283
  os.chdir("/home/xlab-app-center/stable-diffusion-webui/")
284
  try:
285
  while True:
 
296
  os.system(f"python launch.py --api --xformers --exit --enable-insecure-extension-access --gradio-queue --disable-safe-unpickle")
297
  #time.sleep(5)
298
 
299
+ command = "python launch.py --api --api-auth=1:5 --xformers --ui-settings-file /home/xlab-app-center/config.json --ui-config-file /home/xlab-app-center/ui-config.json --gradio-queue --disable-safe-unpickle"
300
 
301
 
302
  #process = subprocess.Popen(command, shell=True)
 
307
  print(f"启动SD发生错误: {e}")
308
  # Create threads for each function
309
  wandb_thread = threading.Thread(target=monitor_gpu)
310
+ keepliving_thread = threading.Thread(target=session_saver)
311
  start_thread = threading.Thread(target=start)
312
 
313
  # Start the threads
314
  wandb_thread.start()
315
  start_thread.start()
316
+ keepliving_thread.start()
317
 
318
  # Wait for both threads to finish
319
  wandb_thread.join()