main
黄海 1 year ago
parent a8023d2951
commit f7603952d5

@ -20,14 +20,7 @@ def queue_prompt(server_address, client_id, prompt):
print(err)
return json.loads(urllib.request.urlopen(req).read())
# GET /system_stats
# 系统统计信息接口
# 打开配置文件
config = ConfigUtil.getConfig()
server_address = config.get('comfyui', 'server_address')
def getUse(server_address):
req = urllib.request.Request("http://{}/system_stats".format(server_address))
res = json.loads(urllib.request.urlopen(req).read())
@ -43,6 +36,15 @@ print("显存共:" + vram_total_str + "GB,已使用:" + used_vram_str + "GB,
# torch_vram_total 16005464064
# torch_vram_free 331041996
# GET /system_stats
# 系统统计信息接口
# 打开配置文件
config = ConfigUtil.getConfig()
server_address = config.get('comfyui', 'server_address')
getUse(server_address)
# 打开文件并读取内容
file_path = r'../JSON/27.json'
with open(file_path, 'r', encoding='utf-8') as file:
@ -68,3 +70,6 @@ print(urllib.request.urlopen(req).read())
# https://www.runcomfy.com/comfyui-nodes/ComfyUI-Easy-Use/easy-cleanGpuUsed
# https://www.yunrobot.cn/showdoc/web/#/641840309/231516860
# https://www.reddit.com/r/comfyui/comments/1cdhz5v/best_way_to_clear_vram_after_each_generation/

Loading…
Cancel
Save