Update samplers.py

This commit is contained in:
lllyasviel
2024-01-31 20:41:18 -08:00
parent d8a2b366e9
commit 13246270fa

View File

@@ -244,7 +244,8 @@ def calc_cond_uncond_batch(model, cond, uncond, x_in, timestep, model_options):
while p is not None:
p.transformer_options = transformer_options
p = p.previous_controlnet
c['control'] = control.get_control(input_x, timestep_, c, len(cond_or_uncond))
control_cond = c.copy() # get_control may change items in this dict, so we need to copy it
c['control'] = control.get_control(input_x, timestep_, control_cond, len(cond_or_uncond))
if 'model_function_wrapper' in model_options:
output = model_options['model_function_wrapper'](model.apply_model, {"input": input_x, "timestep": timestep_, "c": c, "cond_or_uncond": cond_or_uncond}).chunk(batch_chunks)