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.

Fix issue when using multiple t2i adapters with batched images.

comfyanonymous1a57423d30da
diff --git a/comfy/controlnet.py b/comfy/controlnet.py
index 8404054f3..df474201c 100644
--- a/comfy/controlnet.py
+++ b/comfy/controlnet.py
@@ -126,7 +126,10 @@ class ControlBase:
if o[i] is None:
o[i] = prev_val
else:
- o[i] += prev_val
+ if o[i].shape[0] < prev_val.shape[0]:
+ o[i] = prev_val + o[i]
+ else:
+ o[i] += prev_val
return out
class ControlNet(ControlBase):