diff --git a/BaiHu/Util/ComfyUIUtil.py b/BaiHu/Util/ComfyUIUtil.py index 9d40990d..b23733ec 100644 --- a/BaiHu/Util/ComfyUIUtil.py +++ b/BaiHu/Util/ComfyUIUtil.py @@ -138,6 +138,8 @@ def generate_clip(server_address, prompt_data, client_id, output_path, myfilter) # 写入二进制文件 binary_file.write(image_data) ws.close() + # 清理GPU缓存 + clear_cache(server_address) return files diff --git a/BaiHu/doTask.py b/BaiHu/doTask.py index 7d5bb12d..6228e0ec 100644 --- a/BaiHu/doTask.py +++ b/BaiHu/doTask.py @@ -215,8 +215,7 @@ def runComfyUI(model_id, json_data, input_image, target_folder): # # 生成下载链接 url = 'http://hzkc.oss-cn-beijing.aliyuncs.com/' + key res.append(url) - # 清理GPU缓存 - clear_cache(server_address) + # 获取任务 def get_task():