|
|
|
@ -1,6 +1,5 @@
|
|
|
|
|
import os
|
|
|
|
|
import os.path
|
|
|
|
|
import random
|
|
|
|
|
from urllib.parse import urlparse
|
|
|
|
|
|
|
|
|
|
from Util import ConfigUtil
|
|
|
|
@ -135,9 +134,6 @@ def download_image(image_url, file_path):
|
|
|
|
|
printf('图片下载失败,状态码:' + str(response.status_code))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def generate_random_number(length):
|
|
|
|
|
return ''.join(random.choices('0123456789', k=length))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 指定目录下有多少个指定前缀的文件
|
|
|
|
|
def getPrefixFileCount(directory_path, prefix):
|
|
|
|
@ -280,12 +276,10 @@ def get_task():
|
|
|
|
|
|
|
|
|
|
# SD_TXT2IMG
|
|
|
|
|
if model_type_id == 1:
|
|
|
|
|
# 开始生成
|
|
|
|
|
webui_txt_2_img(model_id=model_id, json_data=vjson_data, input_image=input_image)
|
|
|
|
|
|
|
|
|
|
# COMFY_UI
|
|
|
|
|
if model_type_id == 2:
|
|
|
|
|
# 请求
|
|
|
|
|
runComfyUI(model_id=model_id, json_data=vjson_data, input_image=input_image)
|
|
|
|
|
|
|
|
|
|
# SD_IMG2IMG
|
|
|
|
|