modelscope / modelscope/DiffSynth-Studio
TypeError: WanS2VModel.patchify() takes 2 positional arguments but 3 were given
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13.1k
- Forks
- 1.3k
- Avg merge
- 13h 12m
- Merged PRs (30d)
- 45
Description
pipe(
prompt=prompt,
input_image=input_image,
negative_prompt=negative_prompt,
seed=0,
num_frames=num_frames,
height=height,
width=width,
audio_sample_rate=sample_rate,
input_audio=input_audio,
num_inference_steps=40,
sliding_window_size=48, ### 去掉这两处就不会有报错
sliding_window_stride=24, ###
)
使用 s2v 模型推理时,如果添加 sliding_window_size 和 liding_window_stride 这两个参数,会有报错
Traceback (most recent call last):
File "/.projector/apps/pycharm-community-2021.3.2/plugins/python-ce/helpers/pydev/_pydevd_bundle/pydevd_exec2.py", line 3, in Exec
exec(exp, global_vars, local_vars)
File "<input>", line 1, in <module>
File "/llms/DiffSynth-Studio/diffsynth/pipelines/wan_video_new.py", line 1413, in model_fn_wan_video
return TemporalTiler_BCTHW().run(
File "/DiffSynth-Studio/diffsynth/pipelines/wan_video_new.py", line 1346, in run
model_output = model_fn(**model_kwargs).to(device=data_device, dtype=data_dtype)
File "/DiffSynth-Studio/diffsynth/pipelines/wan_video_new.py", line 1491, in model_fn_wan_video
x = dit.patchify(x, control_camera_latents_input)
TypeError: WanS2VModel.patchify() takes 2 positional arguments but 3 were given
似乎是因为在 /llms/DiffSynth-Studio/diffsynth/pipelines/wan_video_new.py 判断然后走了这个 TemporalTiler_BCTHW().run 分支而不是后面的分支导致的
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in diffsynth/pipelines/wan_video_new.py around lines 1346, 1413, and 1491, then inspect the WanS2VModel.patchify signature and the TemporalTiler_BCTHW().run branch. Reproduce the failure with sliding_window_size=48 and sliding_window_stride=24; done means S2V inference accepts those arguments without the reported TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 43/100