From f7d65ff68333743bd21af30d35d003416b2c6211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=B5=B7?= <10402852@qq.com> Date: Mon, 1 Jul 2024 09:10:09 +0800 Subject: [PATCH] 'commit' --- BaiHu/Util/ComfyUIUtil.py | 2 ++ BaiHu/doTask.py | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) 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():