Skip to content

Commit 0e6221c

Browse files
Add some warnings for pin and unpin errors. (comfyanonymous#11561)
1 parent 9ca7e14 commit 0e6221c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

comfy/model_management.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,6 +1169,7 @@ def pin_memory(tensor):
11691169
TOTAL_PINNED_MEMORY += size
11701170
return True
11711171
else:
1172+
logging.warning("Pin error.")
11721173
discard_cuda_async_error()
11731174

11741175
return False
@@ -1199,6 +1200,7 @@ def unpin_memory(tensor):
11991200
TOTAL_PINNED_MEMORY = 0
12001201
return True
12011202
else:
1203+
logging.warning("Unpin error.")
12021204
discard_cuda_async_error()
12031205

12041206
return False

0 commit comments

Comments
 (0)