Skip to content

Commit 3b4b171

Browse files
Alternate fix for #8435 (#8442)
1 parent d8759c7 commit 3b4b171

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

comfy/controlnet.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,8 +390,9 @@ class control_lora_ops(ControlLoraOps, comfy.ops.manual_cast):
390390
pass
391391

392392
for k in self.control_weights:
393-
if k not in {"lora_controlnet"}:
394-
comfy.utils.set_attr_param(self.control_model, k, self.control_weights[k].to(dtype).to(comfy.model_management.get_torch_device()))
393+
if (k not in {"lora_controlnet"}):
394+
if (k.endswith(".up") or k.endswith(".down") or k.endswith(".weight") or k.endswith(".bias")) and ("__" not in k):
395+
comfy.utils.set_attr_param(self.control_model, k, self.control_weights[k].to(dtype).to(comfy.model_management.get_torch_device()))
395396

396397
def copy(self):
397398
c = ControlLora(self.control_weights, global_average_pooling=self.global_average_pooling)

0 commit comments

Comments
 (0)