modelscope / modelscope/DiffSynth-Studio

Error with Wan2.1-Fun-1.3B-Control inference script - 'WanModel' object has no attribute 'ref_conv'

Open
#890 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
13.1k
Forks
1.3k
Avg merge
13h 12m
Merged PRs (30d)
45

Description

Hi @Artiprocher ,

Thanks for your awesome project.

I am trying to infer video generation based on control video and reference image inputs with Wan2.1-Fun-1.3B-Control.

However, I met the error in diffsynth/pipelines/wan_video_new.py: AttributeError: 'WanModel' object has no attribute 'ref_conv'

I have checked the hash_state_dict_keys of Wan2.1-Fun-1.3B-Control, which lacks "has_ref_conv", but the diffsynth/pipelines/wan_video_new.py call dit.ref_conv to process reference_latents as default.

In that way, the control pipeline can work fine with Wan2.1-Fun-V1.1-1.3B-Control instead of the Wan2.1-Fun-1.3B-Control model.

Could you help me figure out how to fix this error?

Many thanks!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with examples/wanvideo/model_inference/Wan2.1-Fun-1.3B-Control.py and compare the model state-dict handling in diffsynth/models/wan_video_dit.py with the reference-latent path at diffsynth/pipelines/wan_video_new.py:1229. Run the control inference using Wan2.1-Fun-1.3B-Control and confirm it completes without the missing ref_conv error, while the supported V1.1 model still works.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.