Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: ControlNet.get_control() missing 1 required positional argument: 'batched_number' #26

Closed
lain105 opened this issue Feb 26, 2023 · 2 comments

Comments

@lain105
Copy link

lain105 commented Feb 26, 2023

I am getting this error when using the example at: https://comfyanonymous.github.io/ComfyUI_examples/controlnet/mixing_controlnets.png

The only changes I made are changing the controlnet model names to the names of my files, swapping to anything 4.5 (also happens on anything 3.0), and changing the vae. Attached is my workspace save (with .txt added so github lets me upload)
I'm on the latest version as of time of posting.

Let me know what else you need. Thanks! Great tool btw :D

Traceback (most recent call last):
File "D:\user\git\ComfyUI\main.py", line 193, in execute
executed += recursive_execute(prompt, self.outputs, x, extra_data)
File "D:\user\git\ComfyUI\main.py", line 87, in recursive_execute
executed += recursive_execute(prompt, outputs, input_unique_id, extra_data)
File "D:\user\git\ComfyUI\main.py", line 87, in recursive_execute
executed += recursive_execute(prompt, outputs, input_unique_id, extra_data)
File "D:\user\git\ComfyUI\main.py", line 92, in recursive_execute
outputs[unique_id] = getattr(obj, obj.FUNCTION)(**input_data_all)
File "D:\user\git\ComfyUI\nodes.py", line 610, in sample
return common_ksampler(self.device, model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise)
File "D:\user\git\ComfyUI\nodes.py", line 576, in common_ksampler
samples = sampler.sample(noise, positive_copy, negative_copy, cfg=cfg, latent_image=latent_image, start_step=start_step, last_step=last_step, force_full_denoise=force_full_denoise, denoise_mask=noise_mask)
File "D:\user\git\ComfyUI\comfy\samplers.py", line 443, in sample
samples = uni_pc.sample_unipc(self.model_wrap, noise, latent_image, sigmas, sampling_function=sampling_function, max_denoise=max_denoise, extra_args=extra_args, noise_mask=denoise_mask, variant='bh2')
File "D:\user\git\ComfyUI\comfy\extra_samplers\uni_pc.py", line 879, in sample_unipc
x = uni_pc.sample(img, timesteps=timesteps, skip_type="time_uniform", method="multistep", order=3, lower_order_final=True)
File "D:\user\git\ComfyUI\comfy\extra_samplers\uni_pc.py", line 731, in sample
model_prev_list = [self.model_fn(x, vec_t)]
File "D:\user\git\ComfyUI\comfy\extra_samplers\uni_pc.py", line 422, in model_fn
return self.data_prediction_fn(x, t)
File "D:\user\git\ComfyUI\comfy\extra_samplers\uni_pc.py", line 404, in data_prediction_fn
noise = self.noise_prediction_fn(x, t)
File "D:\user\git\ComfyUI\comfy\extra_samplers\uni_pc.py", line 398, in noise_prediction_fn
return self.model(x, t)
File "D:\user\git\ComfyUI\comfy\extra_samplers\uni_pc.py", line 330, in model_fn
return noise_pred_fn(x, t_continuous)
File "D:\user\git\ComfyUI\comfy\extra_samplers\uni_pc.py", line 298, in noise_pred_fn
output = sampling_function(model, x, t_input, **model_kwargs)
File "D:\user\git\ComfyUI\comfy\samplers.py", line 193, in sampling_function
cond, uncond = calc_cond_uncond_batch(model_function, cond, uncond, x, timestep, max_total_area, cond_concat)
File "D:\user\git\ComfyUI\comfy\samplers.py", line 170, in calc_cond_uncond_batch
c['control'] = control.get_control(input_x, timestep_, c['c_crossattn'], len(cond_or_uncond))
File "D:\user\git\ComfyUI\comfy\sd.py", line 396, in get_control
control_prev = self.previous_controlnet.get_control(x_noisy, t, cond_txt)
TypeError: ControlNet.get_control() missing 1 required positional argument: 'batched_number'
error.json.txt

@comfyanonymous
Copy link
Owner

Fixed in: dfb397e

@lain105
Copy link
Author

lain105 commented Feb 26, 2023

fixed, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants