Update main.py
Browse files
main.py
CHANGED
@@ -5,10 +5,9 @@
|
|
5 |
# SD 模型路径 /tmp/code/sd/stable-diffusion-webui/models/Stable-diffusion
|
6 |
|
7 |
#comfyui 模型、VAE、Lora由SD文件路径共享
|
8 |
-
|
9 |
# comfyui 插件路径 /tmp/code/sd/ComfyUI/custom_nodes
|
10 |
|
11 |
-
print('
|
12 |
|
13 |
import os
|
14 |
import subprocess
|
@@ -64,6 +63,7 @@ mode_url = [
|
|
64 |
|
65 |
]
|
66 |
|
|
|
67 |
def download_aria2(file_name, download_dir, url):
|
68 |
download_path = os.path.join(download_dir, file_name)
|
69 |
aria2_path = download_path + ".aria2"
|
@@ -78,6 +78,7 @@ def download_aria2(file_name, download_dir, url):
|
|
78 |
print(f'文件 {file_name} 正在下载, 继续断点下载, URL: {url}')
|
79 |
aria2_args = (
|
80 |
f'aria2c --dir {download_dir} --out {file_name} '
|
|
|
81 |
'--summary-interval=15 '#--console-log-level=error
|
82 |
'--header="Referer: https://www.liblib.art/modelinfo/0079e26dfd8a447fbb5553bda66758a8?from=search"'
|
83 |
'-c -x 16 -s 16 '
|
@@ -94,6 +95,7 @@ def download_aria2(file_name, download_dir, url):
|
|
94 |
# 如果没有 .aria2 文件且没有下载完成的文件, 则开始新的下载
|
95 |
aria2_args = (
|
96 |
f'aria2c --dir {download_dir} --out {file_name} '
|
|
|
97 |
'--summary-interval=15 '#--console-log-level=error
|
98 |
'--header="Referer: https://www.liblib.art/modelinfo/0079e26dfd8a447fbb5553bda66758a8?from=search"'
|
99 |
'-c -x 16 -s 16 '
|
|
|
5 |
# SD 模型路径 /tmp/code/sd/stable-diffusion-webui/models/Stable-diffusion
|
6 |
|
7 |
#comfyui 模型、VAE、Lora由SD文件路径共享
|
|
|
8 |
# comfyui 插件路径 /tmp/code/sd/ComfyUI/custom_nodes
|
9 |
|
10 |
+
print('--------------远程执行PY---------------------')
|
11 |
|
12 |
import os
|
13 |
import subprocess
|
|
|
63 |
|
64 |
]
|
65 |
|
66 |
+
|
67 |
def download_aria2(file_name, download_dir, url):
|
68 |
download_path = os.path.join(download_dir, file_name)
|
69 |
aria2_path = download_path + ".aria2"
|
|
|
78 |
print(f'文件 {file_name} 正在下载, 继续断点下载, URL: {url}')
|
79 |
aria2_args = (
|
80 |
f'aria2c --dir {download_dir} --out {file_name} '
|
81 |
+
'--continue=true'
|
82 |
'--summary-interval=15 '#--console-log-level=error
|
83 |
'--header="Referer: https://www.liblib.art/modelinfo/0079e26dfd8a447fbb5553bda66758a8?from=search"'
|
84 |
'-c -x 16 -s 16 '
|
|
|
95 |
# 如果没有 .aria2 文件且没有下载完成的文件, 则开始新的下载
|
96 |
aria2_args = (
|
97 |
f'aria2c --dir {download_dir} --out {file_name} '
|
98 |
+
'--continue=true'
|
99 |
'--summary-interval=15 '#--console-log-level=error
|
100 |
'--header="Referer: https://www.liblib.art/modelinfo/0079e26dfd8a447fbb5553bda66758a8?from=search"'
|
101 |
'-c -x 16 -s 16 '
|