From dfb397e034618e3a1624dd59976ca6b945f7298b Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Sat, 25 Feb 2023 22:12:22 -0500 Subject: [PATCH] Fix multiple controlnets not working. --- comfy/sd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/comfy/sd.py b/comfy/sd.py index 7771081e..e5baddca 100644 --- a/comfy/sd.py +++ b/comfy/sd.py @@ -393,7 +393,7 @@ class ControlNet: def get_control(self, x_noisy, t, cond_txt, batched_number): control_prev = None if self.previous_controlnet is not None: - control_prev = self.previous_controlnet.get_control(x_noisy, t, cond_txt) + control_prev = self.previous_controlnet.get_control(x_noisy, t, cond_txt, batched_number) output_dtype = x_noisy.dtype if self.cond_hint is None or x_noisy.shape[2] * 8 != self.cond_hint.shape[2] or x_noisy.shape[3] * 8 != self.cond_hint.shape[3]: @@ -541,7 +541,7 @@ class T2IAdapter: def get_control(self, x_noisy, t, cond_txt, batched_number): control_prev = None if self.previous_controlnet is not None: - control_prev = self.previous_controlnet.get_control(x_noisy, t, cond_txt) + control_prev = self.previous_controlnet.get_control(x_noisy, t, cond_txt, batched_number) if self.cond_hint is None or x_noisy.shape[2] * 8 != self.cond_hint.shape[2] or x_noisy.shape[3] * 8 != self.cond_hint.shape[3]: if self.cond_hint is not None: