You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
629 B
25 lines
629 B
from Util import ConfigUtil
|
|
from Util.ComfyUIUtil import *
|
|
|
|
# 打开配置文件
|
|
config = ConfigUtil.getConfig()
|
|
server_address = config.get('comfyui', 'server_address')
|
|
|
|
# 清理GPU缓存
|
|
# 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()
|
|
|