Skip to content

Commit a597044

Browse files
comfyanonymouszhangp365
authored andcommitted
Pinned mem also seems to work on AMD. (comfyanonymous#10658)
1 parent 16571d3 commit a597044

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
@@ -1120,7 +1120,7 @@ def cast_to_device(tensor, device, dtype, copy=False):
11201120
TOTAL_PINNED_MEMORY = 0
11211121
MAX_PINNED_MEMORY = -1
11221122
if not args.disable_pinned_memory:
1123-
if is_nvidia():
1123+
if is_nvidia() or is_amd():
11241124
if WINDOWS:
11251125
MAX_PINNED_MEMORY = get_total_memory(torch.device("cpu")) * 0.45 # Windows limit is apparently 50%
11261126
else:

0 commit comments

Comments
 (0)