comfyanonymous / ComfyUI

The most powerful and modular stable diffusion GUI, api and backend with a graph/nodes interface.
https://www.comfy.org/
GNU General Public License v3.0
42.76k stars 4.52k forks source link

TypeError: forward_timestep_embed() got an unexpected keyword argument 'time_context' #2037

Open us-Mike opened 8 months ago

us-Mike commented 8 months ago

when I update the project, raise the error (TypeError: forward_timestep_embed() got an unexpected keyword argument 'time_context') ERROR:root:Traceback (most recent call last): File "/home/yaohs/Work/ComfyUI/execution.py", line 153, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "/home/yaohs/Work/ComfyUI/execution.py", line 83, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "/home/yaohs/Work/ComfyUI/execution.py", line 76, in map_node_over_list results.append(getattr(obj, func)(slice_dict(input_data_all, i))) File "/home/yaohs/Work/ComfyUI/nodes.py", line 1286, in sample return common_ksampler(model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise) File "/home/yaohs/Work/ComfyUI/nodes.py", line 1256, in common_ksampler samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, File "/home/yaohs/Work/ComfyUI/custom_nodes/ComfyUI-AnimateDiff-Evolved/animatediff/sampling.py", line 229, in animatediff_sample return wrap_function_to_inject_xformers_bug_info(orig_comfy_sample)(model, noise, *args, *kwargs) File "/home/yaohs/Work/ComfyUI/custom_nodes/ComfyUI-AnimateDiff-Evolved/animatediff/model_utils.py", line 197, in wrapped_function return function_to_wrap(args, kwargs) File "/home/yaohs/Work/ComfyUI/custom_nodes/ComfyUI-Impact-Pack/modules/impact/sample_error_enhancer.py", line 9, in informative_sample return original_sample(args, kwargs) File "/home/yaohs/Work/ComfyUI/comfy/sample.py", line 100, 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 "/home/yaohs/Work/ComfyUI/comfy/samplers.py", line 711, in sample return sample(self.model, noise, positive, negative, cfg, self.device, sampler, sigmas, self.model_options, latent_image=latent_image, denoise_mask=denoise_mask, callback=callback, disable_pbar=disable_pbar, seed=seed) File "/home/yaohs/Work/ComfyUI/comfy/samplers.py", line 617, in sample samples = sampler.sample(model_wrap, sigmas, extra_args, callback, noise, latent_image, denoise_mask, disable_pbar) File "/home/yaohs/Work/ComfyUI/comfy/samplers.py", line 556, in sample samples = self.sampler_function(model_k, noise, sigmas, extra_args=extra_args, callback=k_callback, disable=disable_pbar, self.extra_options) File "/home/yaohs/miniconda3/envs/cfui/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(args, kwargs) File "/home/yaohs/Work/ComfyUI/comfy/k_diffusion/sampling.py", line 137, in sample_euler denoised = model(x, sigma_hat * s_in, *extra_args) File "/home/yaohs/miniconda3/envs/cfui/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(args, kwargs) File "/home/yaohs/miniconda3/envs/cfui/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(*args, kwargs) File "/home/yaohs/Work/ComfyUI/comfy/samplers.py", line 277, in forward out = self.inner_model(x, sigma, cond=cond, uncond=uncond, cond_scale=cond_scale, model_options=model_options, seed=seed) File "/home/yaohs/miniconda3/envs/cfui/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, *kwargs) File "/home/yaohs/miniconda3/envs/cfui/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(args, kwargs) File "/home/yaohs/Work/ComfyUI/comfy/samplers.py", line 267, in forward return self.apply_model(*args, kwargs) File "/home/yaohs/Work/ComfyUI/comfy/samplers.py", line 264, in apply_model out = sampling_function(self.inner_model, x, timestep, uncond, cond, cond_scale, model_options=model_options, seed=seed) File "/home/yaohs/Work/ComfyUI/custom_nodes/ComfyUI-AnimateDiff-Evolved/animatediff/sampling.py", line 596, in sliding_sampling_function cond, uncond = calc_cond_uncond_batch(model, cond, uncond, x, timestep, model_options) File "/home/yaohs/Work/ComfyUI/custom_nodes/ComfyUI-AnimateDiff-Evolved/animatediff/sampling.py", line 473, in calc_cond_uncond_batch output = model.apply_model(inputx, timestep, c).chunk(batch_chunks) File "/home/yaohs/Work/ComfyUI/comfy/model_base.py", line 73, in apply_model model_output = self.diffusion_model(xc, t, context=context, control=control, transformer_options=transformer_options, extra_conds).float() File "/home/yaohs/miniconda3/envs/cfui/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, *kwargs) File "/home/yaohs/miniconda3/envs/cfui/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(args, kwargs) File "/home/yaohs/Work/ComfyUI/comfy/ldm/modules/diffusionmodules/openaimodel.py", line 854, in forward h = forward_timestep_embed(module, h, emb, context, transformer_options, time_context=time_context, num_video_frames=num_video_frames, image_only_indicator=image_only_indicator) TypeError: forward_timestep_embed() got an unexpected keyword argument 'time_context'

lenage commented 8 months ago

got same issue here

lenage commented 8 months ago

rollback to 022033a0e75901c7c357ab96e1c804fd5da05770 works for me

us-Mike commented 7 months ago

I solved the problem through your method,thank you

0atmeal-ai commented 7 months ago

rollback to 022033a works for me

can you explain this please, im having same error

lenage commented 7 months ago

rollback to 022033a works for me

can you explain this please, im having same error

just git checkout 022033a0e75901c7c357ab96e1c804fd5da05770 to ignore latest changes

0atmeal-ai commented 7 months ago

@lenage Thankyou mate

zcai08 commented 7 months ago

same error. I want to use SVD nodes so rollback doesn't work for me. It seems that forward_timestep_embed() got embedded before, and the new defined one did not get to work. I don't know how to fix it. I just simply copy the new funciton before the calls and looks like it works

ltdrdata commented 7 months ago

same error. I want to use SVD nodes so rollback doesn't work for me. It seems that forward_timestep_embed() got embedded before, and the new defined one did not get to work. I don't know how to fix it. I just simply copy the new funciton before the calls and looks like it works

Even after updating both ComfyUI and AnimateDiff Evolved nodes to the latest versions, is the issue still persisting?

gaathi1111 commented 7 months ago

same error. I want to use SVD nodes so rollback doesn't work for me. It seems that forward_timestep_embed() got embedded before, and the new defined one did not get to work. I don't know how to fix it. I just simply copy the new funciton before the calls and looks like it works

Even after updating both ComfyUI and AnimateDiff Evolved nodes to the latest versions, is the issue still persisting?

yes it still exists

gaathi1111 commented 7 months ago

hi @ltdrdata , this issue is resolved for me. Updating AnimateDiff evolved custom node worked. Thanks.

zcai08 commented 7 months ago

same error. I want to use SVD nodes so rollback doesn't work for me. It seems that forward_timestep_embed() got embedded before, and the new defined one did not get to work. I don't know how to fix it. I just simply copy the new funciton before the calls and looks like it works

Even after updating both ComfyUI and AnimateDiff Evolved nodes to the latest versions, is the issue still persisting?

Got resolved. Thanks