Skip to content

Commit 5718ef6

Browse files
Add total and free ram to /system_stats.
1 parent 13ecf10 commit 5718ef6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

server.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,12 +490,17 @@ async def view_metadata(request):
490490
async def system_stats(request):
491491
device = comfy.model_management.get_torch_device()
492492
device_name = comfy.model_management.get_torch_device_name(device)
493+
cpu_device = comfy.model_management.torch.device("cpu")
494+
ram_total = comfy.model_management.get_total_memory(cpu_device)
495+
ram_free = comfy.model_management.get_free_memory(cpu_device)
493496
vram_total, torch_vram_total = comfy.model_management.get_total_memory(device, torch_total_too=True)
494497
vram_free, torch_vram_free = comfy.model_management.get_free_memory(device, torch_free_too=True)
495498

496499
system_stats = {
497500
"system": {
498501
"os": os.name,
502+
"ram_total": ram_total,
503+
"ram_free": ram_free,
499504
"comfyui_version": get_comfyui_version(),
500505
"python_version": sys.version,
501506
"pytorch_version": comfy.model_management.torch_version,

0 commit comments

Comments
 (0)