From 248aa3e56355d75ac3d8632af769e6c700d9bfac Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Sat, 11 Nov 2023 12:20:16 -0500 Subject: [PATCH] Fix bug. --- comfy/model_patcher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comfy/model_patcher.py b/comfy/model_patcher.py index 6d7a61c4..9dc09791 100644 --- a/comfy/model_patcher.py +++ b/comfy/model_patcher.py @@ -176,7 +176,7 @@ class ModelPatcher: 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)