From bff719976ec45a5e0aefb0a7b9ef9fbfeec1e99f Mon Sep 17 00:00:00 2001 From: a-One-Fan <100067309+a-One-Fan@users.noreply.github.com> Date: Sun, 9 Nov 2025 23:15:06 +0200 Subject: [PATCH] Do not pin memory on Intel devices AFAIK, Intel currently has no equivalent for cudaHost(Un)register. Even if it does, there is no cudaHostUnregister literally and it errors out, so this is good enough to at least make ComfyUI work again. --- comfy/model_management.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/comfy/model_management.py b/comfy/model_management.py index 7012df858..1ae191e14 100644 --- a/comfy/model_management.py +++ b/comfy/model_management.py @@ -1100,7 +1100,7 @@ def pin_memory(tensor): if MAX_PINNED_MEMORY <= 0: return False - if not is_device_cpu(tensor.device): + if not is_device_cpu(tensor.device) or is_intel_xpu(): return False if tensor.is_pinned(): @@ -1126,7 +1126,7 @@ def unpin_memory(tensor): if MAX_PINNED_MEMORY <= 0: return False - if not is_device_cpu(tensor.device): + if not is_device_cpu(tensor.device) or is_intel_xpu(): return False ptr = tensor.data_ptr()