modelscope / modelscope/DiffSynth-Studio
wan 2.2 lora training bug
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13.1k
- Forks
- 1.3k
- Avg merge
- 13h 12m
- Merged PRs (30d)
- 45
Description
[rank0]: File "/opt/nas/p/DiffSynth-Studio/diffsynth/models/wan_video_vae.py", line 472, in forward [rank0]: x = module(x, feat_cache, feat_idx) [rank0]: File "/opt/nas/p/conda/envs/diffsynth/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl [rank0]: return self._call_impl(*args, **kwargs) [rank0]: File "/opt/nas/p/conda/envs/diffsynth/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1857, in _call_impl [rank0]: return inner() [rank0]: File "/opt/nas/p/conda/envs/diffsynth/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1805, in inner [rank0]: result = forward_call(*args, **kwargs) [rank0]: File "/opt/nas/p/DiffSynth-Studio/diffsynth/models/wan_video_vae.py", line 296, in forward [rank0]: x = layer(x, feat_cache[idx]) [rank0]: File "/opt/nas/p/conda/envs/diffsynth/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl [rank0]: return self._call_impl(*args, **kwargs) [rank0]: File "/opt/nas/p/conda/envs/diffsynth/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1857, in _call_impl [rank0]: return inner() [rank0]: File "/opt/nas/p/conda/envs/diffsynth/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1805, in inner [rank0]: result = forward_call(*args, **kwargs) [rank0]: File "/opt/nas/p/DiffSynth-Studio/diffsynth/models/wan_video_vae.py", line 48, in forward [rank0]: x = torch.cat([cache_x, x], dim=2) [rank0]: RuntimeError: Sizes of tensors must match except in dimension 2. Expected size 640 but got size 160 for tensor number 1 in the list. E0729 20:39:56.568000 4091808 site-packages/torch/distributed/elastic/multiprocessing/api.py:874] failed (exitcode: 1) local_rank: 0 (pid: 4093248) of binary: /opt/nas/p/conda/envs/diffsynth/bin/python3.10
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 with diffsynth/models/wan_video_vae.py at lines 48, 296, and 472, then inspect the Wan 2.2 LoRA training path that supplies the cached tensors. Reproduce the reported torch.cat shape mismatch and determine why dimensions 640 and 160 are combined; done means training completes without this RuntimeError and the relevant behavior is covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100