From 54c89503ebd2288d72c189511e0694ff44990465 Mon Sep 17 00:00:00 2001 From: lllyasviel Date: Fri, 23 Feb 2024 16:43:08 -0800 Subject: [PATCH] Disable pin page This is an emergency fix GTX 1060/1050/1066 either does not have shared GPU page vram or have less than 2GB shared page vram - pinning any tensors larger than that will crash Solution is still under investigation. --- ldm_patched/modules/model_management.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ldm_patched/modules/model_management.py b/ldm_patched/modules/model_management.py index 1f98e122..b4025b32 100644 --- a/ldm_patched/modules/model_management.py +++ b/ldm_patched/modules/model_management.py @@ -328,8 +328,8 @@ class LoadedModel: else: real_async_memory += module_mem m.to(self.model.offload_device) - if is_device_cpu(self.model.offload_device): - m._apply(lambda x: x.pin_memory()) + # if is_device_cpu(self.model.offload_device): + # m._apply(lambda x: x.pin_memory()) elif hasattr(m, "weight"): m.to(self.device) mem_counter += module_size(m)