mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-07-27 00:06:37 +00:00
Fix xpu function not implemented. (#9026)
This commit is contained in:
parent
5ad33787de
commit
39dda1d40d
@ -186,10 +186,7 @@ def get_total_memory(dev=None, torch_total_too=False):
|
||||
elif is_intel_xpu():
|
||||
stats = torch.xpu.memory_stats(dev)
|
||||
mem_reserved = stats['reserved_bytes.all.current']
|
||||
if torch_version_numeric < (2, 6):
|
||||
mem_total_xpu = torch.xpu.get_device_properties(dev).total_memory
|
||||
else:
|
||||
_, mem_total_xpu = torch.xpu.mem_get_info(dev)
|
||||
mem_total_torch = mem_reserved
|
||||
mem_total = mem_total_xpu
|
||||
elif is_ascend_npu():
|
||||
|
Loading…
x
Reference in New Issue
Block a user