Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

TypeError: WanS2VDiT.forward() got an unexpected keyword argument 'attn_kwargs'

未关闭
#221 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

@daqiege 已经在做这个了。

开始于 2026年5月27日。

  • #250 来自 @daqiege —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
55/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
python

调研方向

Compare diffsynth_engine/pipelines/wan_s2v.py with diffsynth_engine/models/wan/wan_s2v_dit.py, starting at the predict_noise call and WanS2VDiT.forward signature. Reproduce the failure with examples/wan_speech_to_video.py and verify that the example completes without the unexpected keyword argument error.

由索引模型根据 Issue 内容生成。

描述

In commit 4ae8f2c0542b1fbb6d744a41ac38b57abbd55908, the 'attn_kwargs' is added in the diffsynth_engine/pipelines/wan_s2v.py, we can see diffsynth_engine/models/wan/wan_dit.py is updated, but diffsynth_engine/models/wan/wan_s2v_dit is not updated.

Find the error below.
Traceback (most recent call last):
File "DiffSynth-Engine/examples/wan_speech_to_video.py", line 106, in
wan_rs2v(pipe, args.input_data_dir)
File "DiffSynth-Engine/examples/wan_speech_to_video.py", line 15, in wan_rs2v
frames = pipe(
ref_image=Image.open(f"{input_data_dir}/image.png").convert("RGB"),
...<8 lines>...
ref_as_first_frame=True,
)
File "miniconda3/lib/python3.13/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "DiffSynth-Engine/diffsynth_engine/pipelines/wan_s2v.py", line 530, in call
noise_pred = self.predict_noise_with_cfg(
model=self.dit,
...<14 lines>...
void_audio_input=void_audio_emb,
)
File "DiffSynth-Engine/diffsynth_engine/pipelines/wan_s2v.py", line 326, in predict_noise_with_cfg
positive_noise_pred = self.predict_noise(
model=model,
...<11 lines>...
void_audio_input=void_audio_input,
)
File "DiffSynth-Engine/diffsynth_engine/pipelines/wan_s2v.py", line 399, in predict_noise
noise_pred = model(
x=latents,
...<11 lines>...
attn_kwargs=attn_kwargs,
)
File "miniconda3/lib/python3.13/site-packages/torch/nn/modules/module.py", line 1739, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "miniconda3/lib/python3.13/site-packages/torch/nn/modules/module.py", line 1750, in _call_impl
return forward_call(*args, **kwargs)
TypeError: WanS2VDiT.forward() got an unexpected keyword argument 'attn_kwargs'

主要语言
Python
星标
433
派生
51
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

modelscope/DiffSynth-Engine 的其他 Issue

查看 modelscope/DiffSynth-Engine 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。