1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-02 23:14:49 +08:00
This commit is contained in:
comfyanonymous
2023-11-11 12:20:16 -05:00
parent 4a8a839b40
commit 248aa3e563

View File

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