modelscope / modelscope/DiffSynth-Studio

wan_1.3b_vace.py inference problem

Open
#577 1 comment 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

This is the error I encountered when running video+image in wan_1.3b_vace.py.

An error occurred when running torchrun --nproc_per_node=2 wan_1.3b_vace.py

The key error message is:
RuntimeError: The size of tensor a (12716) must match the size of tensor b (25432) at non-singleton dimension 1

This error occurs at line 580 in the diffsynth/pipelines/wan_video.py file:
x = x + vace_hints[vace.vace_layers_mapping[block_id]] * vace_scale

The other wan2.1 models can perform inference normally, only vace encounters errors. Changing the resolution still results in a fixed error, with the size of a always being half of b.

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

Reproduce the failure with torchrun --nproc_per_node=2 wan_1.3b_vace.py, then inspect line 580 in diffsynth/pipelines/wan_video.py, especially the VACE hint mapping used in the tensor addition. Compare the tensor dimensions for the VACE and other Wan 2.1 inference paths; done means video+image inference completes without the dimension mismatch.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.