main
黄海 1 year ago
parent 08189b8315
commit 26d3e83b46

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

@ -131,7 +131,17 @@ def runComfyUI(model_id, json_data, input_image, target_folder):
def download_image(image_url, file_path):
os.system('./Tools/wget ' + image_url + ' -O ' + file_path)
# 发送GET请求
response = requests.get(image_url)
# 检查请求是否成功
if response.status_code == 200:
# 打开一个文件用于写入
with open(file_path, 'wb') as f:
# 将响应的内容写入文件中
f.write(response.content)
else:
printf('图片下载失败,状态码:' + str(response.status_code))
# 根据输入的图片集合,填充到

Loading…
Cancel
Save