From 82feeac7d71157636f82e5b5ffaccc4ff1304967 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:07:38 +0800 Subject: [PATCH] 'commit' --- BaiHu/Tools/TestComfyUIApi.py | 7 ------- BaiHu/Util/ComfyUIUtil.py | 5 +++++ .../__pycache__/ComfyUIUtil.cpython-310.pyc | Bin 4332 -> 4424 bytes 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/BaiHu/Tools/TestComfyUIApi.py b/BaiHu/Tools/TestComfyUIApi.py index 5f806d2c..b9419626 100644 --- a/BaiHu/Tools/TestComfyUIApi.py +++ b/BaiHu/Tools/TestComfyUIApi.py @@ -1,16 +1,9 @@ from Util import ConfigUtil from Util.ComfyUIUtil import * - # 打开配置文件 config = ConfigUtil.getConfig() server_address = config.get('comfyui', 'server_address') -# 显示显卡使用率 -print('清理显存前:' + getUse(server_address)) - # 清理GPU缓存 clearGPU(server_address) - -# 显示显卡使用率 -print('清理显存后:' + getUse(server_address)) diff --git a/BaiHu/Util/ComfyUIUtil.py b/BaiHu/Util/ComfyUIUtil.py index d7faa39d..384c2908 100644 --- a/BaiHu/Util/ComfyUIUtil.py +++ b/BaiHu/Util/ComfyUIUtil.py @@ -102,6 +102,8 @@ def getUse(server_address): # 清理GPU显存 def clearGPU(server_address): + # 显示显卡使用率 + print('清理显存前:' + getUse(server_address)) # 打开文件并读取内容 file_path = r'../JSON/clearGPU.json' if not os.path.exists(file_path): @@ -111,6 +113,9 @@ def clearGPU(server_address): # 清理 queue_prompt(server_address, "cleanGpuRam", prompt_data) + # 显示显卡使用率 + print('清理显存后:' + getUse(server_address)) + # 生成图像 def generate_clip(server_address, prompt_data, client_id, output_path, myfilter): diff --git a/BaiHu/Util/__pycache__/ComfyUIUtil.cpython-310.pyc b/BaiHu/Util/__pycache__/ComfyUIUtil.cpython-310.pyc index 3e85484d0ab9d670da1bd7dbcc805cbe217fd6d8..b520b841eab9946ae023a8252f4987ed3ea7c02b 100644 GIT binary patch delta 268 zcmaE(ctVLUpO=@50SNpVo6?p^Y~)+bRbK<-mN29+mN3>ZG&70=F(X3?Q!Qf&Qx@|A zmKw%|jKxAJ%s@VC4Py#R3Tp~mFLOU{EmH~G0`?lFg^ab#;S4DZEI`=I%*c?(VaQOd zSq?M<1S5gCgrkNbg}sIuBnz~M1H~SOU}*+TPQOwipd+5`Xnj7R?b(cdPuI?P+S&Vl z&#cKZ+7DfR^9!8n}Jj^1SUvNKR XWUSnLmRF34al+;&{H%=3f_<-8e@S delta 203 zcmX@1^hS{{pO=@50SF8ko6^3CZ{%CeRUZT7rZCnrmM~;7E?}x*T*z3=mBIw%GuJSt zFsHDju=X