Update launch.py
Browse files
launch.py
CHANGED
@@ -1,9 +1,20 @@
|
|
|
|
1 |
from modules import launch_utils
|
2 |
import os
|
3 |
import subprocess
|
4 |
import threading
|
5 |
|
|
|
6 |
args = launch_utils.args
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
python = launch_utils.python
|
8 |
git = launch_utils.git
|
9 |
index_url = launch_utils.index_url
|
@@ -34,7 +45,10 @@ def find_and_print_links():
|
|
34 |
line = log_process.stdout.readline()
|
35 |
if "Public WebUI Colab URL" in line:
|
36 |
url = line.split("Public WebUI Colab URL: ")[1].strip()
|
37 |
-
print(url)
|
|
|
|
|
|
|
38 |
|
39 |
# 打开日志文件以写入程序的所有输出
|
40 |
log_file_path = '/bushu/logs_run.txt'
|
|
|
1 |
+
# 导入所需的模块
|
2 |
from modules import launch_utils
|
3 |
import os
|
4 |
import subprocess
|
5 |
import threading
|
6 |
|
7 |
+
# 设置启动参数
|
8 |
args = launch_utils.args
|
9 |
+
args.listen = True
|
10 |
+
args.xformers = True
|
11 |
+
args.enable_insecure_extension_access = True
|
12 |
+
args.theme = "dark"
|
13 |
+
args.gradio_queue = True
|
14 |
+
args.multiple = True
|
15 |
+
args.no_download_sd_model = True
|
16 |
+
args.share = True
|
17 |
+
|
18 |
python = launch_utils.python
|
19 |
git = launch_utils.git
|
20 |
index_url = launch_utils.index_url
|
|
|
45 |
line = log_process.stdout.readline()
|
46 |
if "Public WebUI Colab URL" in line:
|
47 |
url = line.split("Public WebUI Colab URL: ")[1].strip()
|
48 |
+
print(url) # 在控制台中显示链接
|
49 |
+
log_file.write(url + '\n') # 将链接记录到日志文件
|
50 |
+
else:
|
51 |
+
log_file.write(line) # 将其他消息记录到日志文件
|
52 |
|
53 |
# 打开日志文件以写入程序的所有输出
|
54 |
log_file_path = '/bushu/logs_run.txt'
|