|
|
|
@ -176,9 +176,10 @@ def get_webui_used(webui_server):
|
|
|
|
|
# free = jo[1].replace('free', '').replace(' ', '').replace(':', '').replace('GB', '')
|
|
|
|
|
used = jo[2].replace('used', '').replace(' ', '').replace(':', '').replace('GB', '')
|
|
|
|
|
used_lv = round(1.0 * (float(used)) / float(total) * 100, 2)
|
|
|
|
|
print("显存:" + total + "GB,已使用:" + used + "GB,使用率:" + str(used_lv) + '%')
|
|
|
|
|
# print("显存:" + total + "GB,已使用:" + used + "GB,使用率:" + str(used_lv) + '%')
|
|
|
|
|
else:
|
|
|
|
|
print("调用集成的获取显卡显存代码失败!")
|
|
|
|
|
# print("调用集成的获取显卡显存代码失败!")
|
|
|
|
|
pass
|
|
|
|
|
return total, used
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|