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.
This commit is contained in:
lllyasviel
2024-02-23 16:43:08 -08:00
parent 16caff3d14
commit 54c89503eb

View File

@@ -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)