mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-25 15:55:18 +00:00
More accurate total
This commit is contained in:
parent
b5dd15c67a
commit
499641ebf1
@ -328,7 +328,7 @@ def get_total_memory(dev=None, torch_total_too=False):
|
|||||||
mem_reserved = stats['reserved_bytes.all.current']
|
mem_reserved = stats['reserved_bytes.all.current']
|
||||||
_, mem_total_cuda = torch.cuda.mem_get_info(dev)
|
_, mem_total_cuda = torch.cuda.mem_get_info(dev)
|
||||||
mem_total_torch = mem_reserved
|
mem_total_torch = mem_reserved
|
||||||
mem_total = mem_total_cuda + mem_total_torch
|
mem_total = mem_total_cuda
|
||||||
|
|
||||||
if torch_total_too:
|
if torch_total_too:
|
||||||
return (mem_total, mem_total_torch)
|
return (mem_total, mem_total_torch)
|
||||||
|
Loading…
Reference in New Issue
Block a user