ACCA225 commited on
Commit
4bb9562
1 Parent(s): 32630d2

Update app2.py

Browse files
Files changed (1) hide show
  1. app2.py +4 -3
app2.py CHANGED
@@ -250,13 +250,14 @@ def start():
250
  #time.sleep(5)
251
 
252
  command = "python launch.py --api --xformers --enable-insecure-extension-access --gradio-queue --disable-safe-unpickle"
253
- command1 = "python launch.py --ui-config-file=/home/xlab-app-center/stable-diffusion-webui/ui-config-pri.json --api --xformers --enable-insecure-extension-access --gradio-queue --disable-safe-unpickle --port=7862 & ngrok http 7862 --authtoken=2bgXLjjKFvxfbuZFlR2NMZkvL8n_4WrK7f15FLtWb8p7v3oaF"
254
- command2 = "python launch.py --ui-config-file=/home/xlab-app-center/stable-diffusion-webui/ui-config-pri.json --api --xformers --enable-insecure-extension-access --gradio-queue --disable-safe-unpickle --port=7863 & ngrok http 7863 --authtoken=2CXyNlT9xGfFoL5ruI6hQV20FNq_7tbmuzS9RtyNTkyEe1J6C"
255
  process = subprocess.Popen(command, shell=True)
256
  time.sleep(250)
257
  process = subprocess.Popen(command1, shell=True)
258
  time.sleep(100)
259
- os.system(f"{command2}")
 
260
  except Exception as e:
261
  # 在这里处理异常的代码
262
  print(f"启动SD发生错误: {e}")
 
250
  #time.sleep(5)
251
 
252
  command = "python launch.py --api --xformers --enable-insecure-extension-access --gradio-queue --disable-safe-unpickle"
253
+ command1 = "python launch.py --ui-config-file=/home/xlab-app-center/stable-diffusion-webui/ui-config-pri.json --api --xformers --enable-insecure-extension-access --gradio-queue --disable-safe-unpickle --port=7862"
254
+ command2 = "python launch.py --ui-config-file=/home/xlab-app-center/stable-diffusion-webui/ui-config-pri.json --api --xformers --enable-insecure-extension-access --gradio-queue --disable-safe-unpickle --port=7863"
255
  process = subprocess.Popen(command, shell=True)
256
  time.sleep(250)
257
  process = subprocess.Popen(command1, shell=True)
258
  time.sleep(100)
259
+ print("启动ngrok中")
260
+ os.system(f"{command2} & ngrok http 7862 --authtoken=2bgXLjjKFvxfbuZFlR2NMZkvL8n_4WrK7f15FLtWb8p7v3oaF & ngrok http 7863 --authtoken=2CXyNlT9xGfFoL5ruI6hQV20FNq_7tbmuzS9RtyNTkyEe1J6C")
261
  except Exception as e:
262
  # 在这里处理异常的代码
263
  print(f"启动SD发生错误: {e}")