From 5fd50d3b891514ed1f2d2189c7c3c62432764ec4 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:08:34 +0800 Subject: [PATCH] 'commit' --- BaiHu/Tools/TestComfyUIApi.py | 2 +- BaiHu/Util/ComfyUIUtil.py | 4 ++-- .../__pycache__/ComfyUIUtil.cpython-310.pyc | Bin 4424 -> 4421 bytes 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/BaiHu/Tools/TestComfyUIApi.py b/BaiHu/Tools/TestComfyUIApi.py index b9419626..a5453949 100644 --- a/BaiHu/Tools/TestComfyUIApi.py +++ b/BaiHu/Tools/TestComfyUIApi.py @@ -6,4 +6,4 @@ config = ConfigUtil.getConfig() server_address = config.get('comfyui', 'server_address') # 清理GPU缓存 -clearGPU(server_address) +clear_cache(server_address) diff --git a/BaiHu/Util/ComfyUIUtil.py b/BaiHu/Util/ComfyUIUtil.py index 384c2908..9d40990d 100644 --- a/BaiHu/Util/ComfyUIUtil.py +++ b/BaiHu/Util/ComfyUIUtil.py @@ -94,14 +94,14 @@ def getUse(server_address): used_vram = vram_total - vram_free used_vram_str = str(int((vram_total - vram_free) / 1024 / 1024 / 1024 + 0.5)) used_lv = round(1.0 * (used_vram) / vram_total * 100, 2) - return "显存共:" + vram_total_str + "GB,已使用:" + used_vram_str + "GB,使用率:" + str(used_lv) + "% " + return "显存共" + vram_total_str + "GB,已使用" + used_vram_str + "GB,使用率:" + str(used_lv) + "% " # 如何清空Comfyui的gpu缓存 # https://wailikeji.blog.csdn.net/article/details/140035515 # 清理GPU显存 -def clearGPU(server_address): +def clear_cache(server_address): # 显示显卡使用率 print('清理显存前:' + getUse(server_address)) # 打开文件并读取内容 diff --git a/BaiHu/Util/__pycache__/ComfyUIUtil.cpython-310.pyc b/BaiHu/Util/__pycache__/ComfyUIUtil.cpython-310.pyc index b520b841eab9946ae023a8252f4987ed3ea7c02b..432fa4edb04f5411d21a3e26250c85373d5059ff 100644 GIT binary patch delta 76 zcmX@1bX18qpO=@50SG!6o6;6<