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.

22 lines
564 B

1 year ago
from Util import ConfigUtil
from Util.ComfyUIUtil import *
1 year ago
1 year ago
# 打开配置文件
config = ConfigUtil.getConfig()
1 year ago
comfyui_address = config.get('comfyui', 'server_address')
webui_address = config.get('webui', 'webui_address')
1 year ago
1 year ago
# 清理GPU缓存
1 year ago
info = get_comfyui_used(comfyui_address)
1 year ago
print(info)
1 year ago
clear_comfyui_cache(comfyui_address)
info = get_comfyui_used(comfyui_address)
1 year ago
print(info)
# 获取使显存数量
1 year ago
get_webui_used(webui_address)
1 year ago
# 清理缓存
1 year ago
clear_webui_cache(webui_address)
1 year ago
# 获取使显存数量
1 year ago
get_webui_used(webui_address)