ComfyUI-AnimateDiff-Evolved: Error occurred when executing KSampler: cat() received an invalid combination of arguments - got (Tensor, int), but expected one of:
Greetings @Kosinkadink
I’ve been trying to get this node to work but have been running into an error I do not particular understand. The following error occurs when I try and run the workflow you provided here but I keep running into the following error. Everything appears to be installed correctly and the KSampler works fine for image generation so I’m not sure what’s going on. Let me know if you can provide any additional info. I’m running comfyui via a docker container in wsl2(https://github.com/AbdBarho/stable-diffusion-webui-docker).
Error occurred when executing KSampler:
cat() received an invalid combination of arguments - got (Tensor, int), but expected one of:
* (tuple of Tensors tensors, int dim, *, Tensor out)
* (tuple of Tensors tensors, name dim, *, Tensor out)
File "/stable-diffusion/execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "/stable-diffusion/execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "/stable-diffusion/execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "/stable-diffusion/nodes.py", line 1211, in sample
return common_ksampler(model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise)
File "/stable-diffusion/nodes.py", line 1181, in common_ksampler
samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image,
File "/stable-diffusion/custom_nodes/ComfyUI-AnimateDiff-Evolved/animatediff/sampling.py", line 161, in animatediff_sample
return wrap_function_to_inject_xformers_bug_info(orig_comfy_sample)(model, *args, **kwargs)
File "/stable-diffusion/custom_nodes/ComfyUI-AnimateDiff-Evolved/animatediff/model_utils.py", line 144, in wrapped_function
return function_to_wrap(*args, **kwargs)
File "/stable-diffusion/comfy/sample.py", line 95, in sample
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, sigmas=sigmas, callback=callback, disable_pbar=disable_pbar, seed=seed)
File "/stable-diffusion/comfy/samplers.py", line 733, in sample
samples = getattr(k_diffusion_sampling, "sample_{}".format(self.sampler))(self.model_k, noise, sigmas, extra_args=extra_args, callback=k_callback, disable=disable_pbar)
File "/opt/conda/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/stable-diffusion/comfy/k_diffusion/sampling.py", line 137, in sample_euler
denoised = model(x, sigma_hat * s_in, **extra_args)
File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/stable-diffusion/comfy/samplers.py", line 323, in forward
out = self.inner_model(x, sigma, cond=cond, uncond=uncond, cond_scale=cond_scale, cond_concat=cond_concat, model_options=model_options, seed=seed)
File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/stable-diffusion/comfy/k_diffusion/external.py", line 125, in forward
eps = self.get_eps(input * c_in, self.sigma_to_t(sigma), **kwargs)
File "/stable-diffusion/comfy/k_diffusion/external.py", line 151, in get_eps
return self.inner_model.apply_model(*args, **kwargs)
File "/stable-diffusion/comfy/samplers.py", line 311, in apply_model
out = sampling_function(self.inner_model.apply_model, x, timestep, uncond, cond, cond_scale, cond_concat, model_options=model_options, seed=seed)
File "/stable-diffusion/custom_nodes/ComfyUI-AnimateDiff-Evolved/animatediff/sampling.py", line 527, in sliding_sampling_function
cond, uncond = calc_cond_uncond_batch(model_function, cond, uncond, x, timestep, max_total_area, cond_concat, model_options)
File "/stable-diffusion/custom_nodes/ComfyUI-AnimateDiff-Evolved/animatediff/sampling.py", line 427, in calc_cond_uncond_batch
output = model_function(input_x, timestep_, **c).chunk(batch_chunks)
File "/stable-diffusion/comfy/model_base.py", line 56, in apply_model
context = torch.cat(c_crossattn, 1)
About this issue
- Original URL
- State: closed
- Created 9 months ago
- Reactions: 2
- Comments: 16 (9 by maintainers)
Yeah I haven’t changed anything from your original workflow since I’m just trying to confirm that everything is installed properly. Clearly it is not.
As of right now I’m installing the custom node via the docker file.
Then I add the models to the appropriate directory and they seem to appear no problem.
This how it the WF looks after the failure:
full log:
@Kosinkadink thanks boss. yeah that was it. sorry for the oversight and thank you for the breadcrumbs. I think @nov1ce1762 problem is the same, old portable comfyui. Feel free to close the issue or leave it for people looking to troubleshoot this in the future.