Fix weights not being copied for lowvram patch

This can probably be improved since the weights themselves never need to be copied as they cannot be changed anyway.
This commit is contained in:
City
2024-08-28 20:23:08 +02:00
committed by GitHub
parent 3d9869240b
commit abe5c6a6c9
+1 -1
View File
@@ -120,7 +120,7 @@ class GGUFModelPatcher(comfy.model_patcher.ModelPatcher):
if device_to is not None:
out_weight = weight.to(device_to, copy=True)
else:
out_weight = weight.clone()
out_weight = weight.to(weight.device, copy=True) # make sure patches are copied
if self.patch_on_device:
patches = move_patch_to_cuda(patches, self.load_device)