Skip to content

Commit 09dc24c

Browse files
Pinned mem also seems to work on AMD. (#10658)
1 parent 1d69245 commit 09dc24c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

comfy/model_management.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1087,7 +1087,7 @@ def cast_to_device(tensor, device, dtype, copy=False):
10871087
TOTAL_PINNED_MEMORY = 0
10881088
MAX_PINNED_MEMORY = -1
10891089
if not args.disable_pinned_memory:
1090-
if is_nvidia():
1090+
if is_nvidia() or is_amd():
10911091
if WINDOWS:
10921092
MAX_PINNED_MEMORY = get_total_memory(torch.device("cpu")) * 0.45 # Windows limit is apparently 50%
10931093
else:

0 commit comments

Comments
 (0)