Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

Alternate fix for #8435 (#8442)

comfyanonymous3b4b171e18c9
diff --git a/comfy/controlnet.py b/comfy/controlnet.py
index 11483e21d..9a47b86f2 100644
--- a/comfy/controlnet.py
+++ b/comfy/controlnet.py
@@ -390,8 +390,9 @@ class ControlLora(ControlNet):
pass
for k in self.control_weights:
- if k not in {"lora_controlnet"}:
- comfy.utils.set_attr_param(self.control_model, k, self.control_weights[k].to(dtype).to(comfy.model_management.get_torch_device()))
+ if (k not in {"lora_controlnet"}):
+ if (k.endswith(".up") or k.endswith(".down") or k.endswith(".weight") or k.endswith(".bias")) and ("__" not in k):
+ comfy.utils.set_attr_param(self.control_model, k, self.control_weights[k].to(dtype).to(comfy.model_management.get_torch_device()))
def copy(self):
c = ControlLora(self.control_weights, global_average_pooling=self.global_average_pooling)