Skip to content

Commit

Permalink
Fix bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Nov 11, 2023
1 parent 4a8a839 commit 248aa3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion comfy/model_patcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def patch_model(self, device_to=None):
inplace_update = self.weight_inplace_update

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:
temp_weight = comfy.model_management.cast_to_device(weight, device_to, torch.float32, copy=True)
Expand Down

0 comments on commit 248aa3e

Please sign in to comment.