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