Skip to content

Commit

Permalink
Fix multiple controlnets not working.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Feb 26, 2023
1 parent 6de6246 commit dfb397e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions comfy/sd.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ def __init__(self, control_model, device="cuda"):
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]:
Expand Down Expand Up @@ -541,7 +541,7 @@ def __init__(self, t2i_model, channels_in, device="cuda"):
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:
Expand Down

0 comments on commit dfb397e

Please sign in to comment.