Skip to content

Commit 39dda1d

Browse files
Fix xpu function not implemented. (Comfy-Org#9026)
1 parent 5ad3378 commit 39dda1d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

comfy/model_management.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,7 @@ def get_total_memory(dev=None, torch_total_too=False):
186186
elif is_intel_xpu():
187187
stats = torch.xpu.memory_stats(dev)
188188
mem_reserved = stats['reserved_bytes.all.current']
189-
if torch_version_numeric < (2, 6):
190-
mem_total_xpu = torch.xpu.get_device_properties(dev).total_memory
191-
else:
192-
_, mem_total_xpu = torch.xpu.mem_get_info(dev)
189+
mem_total_xpu = torch.xpu.get_device_properties(dev).total_memory
193190
mem_total_torch = mem_reserved
194191
mem_total = mem_total_xpu
195192
elif is_ascend_npu():

0 commit comments

Comments
 (0)