Commit 248aa3e5 authored by comfyanonymous's avatar comfyanonymous
Browse files

Fix bug.

parent 4a8a839b
...@@ -176,7 +176,7 @@ class ModelPatcher: ...@@ -176,7 +176,7 @@ class ModelPatcher:
inplace_update = self.weight_inplace_update inplace_update = self.weight_inplace_update
if key not in self.backup: if key not in self.backup:
self.backup[key] = weight.to(device=device_to, copy=inplace_update) self.backup[key] = weight.to(device=self.offload_device, copy=inplace_update)
if device_to is not None: if device_to is not None:
temp_weight = comfy.model_management.cast_to_device(weight, device_to, torch.float32, copy=True) temp_weight = comfy.model_management.cast_to_device(weight, device_to, torch.float32, copy=True)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment