|
|
|
@ -6,6 +6,19 @@ config = ConfigUtil.getConfig()
|
|
|
|
|
server_address = config.get('comfyui', 'server_address')
|
|
|
|
|
|
|
|
|
|
# 清理GPU缓存
|
|
|
|
|
info = getUse(server_address)
|
|
|
|
|
print(info)
|
|
|
|
|
clear_cache(server_address)
|
|
|
|
|
# info = getUse(server_address)
|
|
|
|
|
# print(info)
|
|
|
|
|
# clear_cache(server_address)
|
|
|
|
|
|
|
|
|
|
def get_vram():
|
|
|
|
|
# webui 服务器地址
|
|
|
|
|
webui_server = config['webui']['webui_server']
|
|
|
|
|
vram_url = webui_server + config['webui']['get_vram_url']
|
|
|
|
|
res = submit_post(vram_url, None)
|
|
|
|
|
if res.status_code == 200:
|
|
|
|
|
print(res.text)
|
|
|
|
|
else:
|
|
|
|
|
print("调用集成的获取显卡显存代码失败!")
|
|
|
|
|
|
|
|
|
|
get_vram()
|
|
|
|
|
|
|
|
|
|