WanAttentionBlock.forward() got an unexpected keyword argument 'context_img_len' is
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 158
Description
### Custom Node Testing
- [ ] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)
### Expected Behavior
WanAttentionBlock.forward() got an unexpected keyword argument 'context_img_len' is
### Actual Behavior
WanAttentionBlock.forward() got an unexpected keyword argument 'context_img_len' is
### Steps to Reproduce
WanAttentionBlock.forward() got an unexpected keyword argument 'context_img_len' is
### Debug Logs
```powershell
Attempting to release mmap (253)
0%| | 0/20 [00:00
lambda input, sigma, **kwargs: predict_eps_sigma(model, input, sigma, **kwargs),
File "/ssd1/yanzhelee/ComfyUI/comfy/extra_samplers/uni_pc.py", line 843, in predict_eps_sigma
return (input - model(input, sigma_in, **kwargs)) / sigma
File "/ssd1/yanzhelee/ComfyUI/comfy/samplers.py", line 390, in __call__
out = self.inner_model(x, sigma, model_options=model_options, seed=seed)
File "/ssd1/yanzhelee/ComfyUI/comfy/samplers.py", line 939, in __call__
return self.predict_noise(*args, **kwargs)
File "/ssd1/yanzhelee/ComfyUI/comfy/samplers.py", line 942, in predict_noise
return sampling_function(self.inner_model, x, timestep, self.conds.get("negative", None), self.conds.get("positive", None), self.cfg, model_options=model_options, seed=seed)
File "/ssd1/yanzhelee/ComfyUI/comfy/samplers.py", line 370, in sampling_function
out = calc_cond_batch(model, conds, x, timestep, model_options)
File "/ssd1/yanzhelee/ComfyUI/comfy/samplers.py", line 206, in calc_cond_batch
return executor.execute(model, conds, x_in, timestep, model_options)
File "/ssd1/yanzhelee/ComfyUI/comfy/patcher_extension.py", line 110, in execute
return self.original(*args, **kwargs)
File "/ssd1/yanzhelee/ComfyUI/comfy/samplers.py", line 317, in _calc_cond_batch
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)
File "/ssd1/yanzhelee/ComfyUI/custom_nodes/comfyui-kjnodes/nodes/model_optimization_nodes.py", line 1439, in unet_wrapper_function
out = model_function(input, timestep, **c)
File "/ssd1/yanzhelee/ComfyUI/comfy/model_base.py", line 133, in apply_model
return comfy.patcher_extension.WrapperExecutor.new_class_executor(
File "/ssd1/yanzhelee/ComfyUI/comfy/patcher_extension.py", line 110, in execute
return self.original(*args, **kwargs)
File "/ssd1/yanzhelee/ComfyUI/comfy/model_base.py", line 165, in _apply_model
model_output = self.diffusion_model(xc, t, context=context, control=control, transformer_options=transformer_options, **extra_conds).float()
File "/home/work/anaconda3/envs/comfyui/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/work/anaconda3/envs/comfyui/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "/ssd1/yanzhelee/ComfyUI/comfy/ldm/wan/model.py", line 456, in forward
return self.forward_orig(x, timestep, context, clip_fea=clip_fea, freqs=freqs)[:, :, :t, :h, :w]
File "/ssd1/yanzhelee/ComfyUI/custom_nodes/comfyui-kjnodes/nodes/model_optimization_nodes.py", line 1305, in teacache_wanvideo_forward_orig
x = block(x, e=e0, freqs=freqs, context=context, context_img_len=context_img_len)
File "/home/work/anaconda3/envs/comfyui/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/work/anaconda3/envs/comfyui/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
TypeError: WanAttentionBlock.forward() got an unexpected keyword argument 'context_img_len'
```
### Other
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.