huggingface / huggingface/diffusers
Wan2.1 i2v running issue
- Dominant language
- Python
- Stars
- 34.5k
- Forks
- 7.3k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 91
Description
### Describe the bug
When I was trying to run the script which is python cache-dit/examples/pipelinerun_wan_2.2.py by the weight of Wan2.1-I2V-14B-720P-Diffusers, an error displayed.
Traceback (most recent call last):
File "/home/mzb/cache-dit/examples/pipeline/run_wan.py", line 60, in
video = pipe(
^^^^^
File "/root/miniconda3/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 120, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/lib/python3.11/site-packages/diffusers/pipelines/wan/pipeline_wan.py", line 613, in __call__
latents = self.scheduler.step(noise_pred, t, latents, return_dict=False)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/lib/python3.11/site-packages/diffusers/schedulers/scheduling_unipc_multistep.py", line 992, in step
model_output_convert = self.convert_model_output(model_output, sample=sample)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/lib/python3.11/site-packages/diffusers/schedulers/scheduling_unipc_multistep.py", line 628, in convert_model_output
x0_pred = sample - sigma_t * model_output
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
RuntimeError: The size of tensor a (36) must match the size of tensor b (16) at non-singleton dimension 1
### Reproduction
See description
### Logs
```shell
```
### System Info
- 🤗 Diffusers version: 0.35.2
- Platform: Linux-5.15.0-25-generic-x86_64-with-glibc2.35
- Running on Google Colab?: No
- Python version: 3.11.11
- PyTorch version (GPU?): 2.9.0+cu128 (True)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Huggingface_hub version: 0.36.0
- Transformers version: 4.57.1
- Accelerate version: 1.11.0
- PEFT version: not installed
- Bitsandbytes version: not installed
- Safetensors version: 0.6.2
- xFormers version: not installed
- Accelerator: NVIDIA L20, 46068 MiB
### Who can help?
_No response_
Contributor guide
Research direction
Start with examples/pipelinerun_wan_2.2.py and pipeline/run_wan.py, then reproduce the run using Wan2.1-I2V-14B-720P-Diffusers and the listed Diffusers and PyTorch versions. Trace the call into diffusers' Wan pipeline and UniPC scheduler where tensors of sizes 36 and 16 meet; done means the example runs without the reported shape-mismatch error.
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
- Mostly clear
- Newbie friendliness
- 35/100