Fixed issue when batched image was used as a controlnet input.

This commit is contained in:
comfyanonymous
2023-02-25 14:57:28 -05:00
parent d6ed202679
commit af3cc1b5fb
2 changed files with 27 additions and 5 deletions

View File

@@ -167,7 +167,7 @@ def sampling_function(model_function, x, timestep, uncond, cond, cond_scale, con
timestep_ = torch.cat([timestep] * batch_chunks)
if control is not None:
c['control'] = control.get_control(input_x, timestep_, c['c_crossattn'])
c['control'] = control.get_control(input_x, timestep_, c['c_crossattn'], len(cond_or_uncond))
output = model_function(input_x, timestep_, cond=c).chunk(batch_chunks)
del input_x