AILab-CVC / VideoCrafter

VideoCrafter2: Overcoming Data Limitations for High-Quality Video Diffusion Models
https://ailab-cvc.github.io/videocrafter2/
Other
4.57k stars 341 forks source link

shape mismatch when running default example #38

Closed aiXander closed 1 year ago

aiXander commented 1 year ago

I'm getting

einops.EinopsError:  Error while processing rearrange-reduction pattern "(b h) n d -> b n (h d)".
 Input tensor shape: torch.Size([16, 2560, 320]). Additional info: {'h': 5}.
 Shape mismatch, can't divide axis of length 16 in chunks of 5

when running the default sh scripts/run_image2video.sh

Number18-tong commented 1 year ago

I got the same error, have you solved this problem?

Mozer commented 1 year ago

add parameter --frames 15 in run_image2video.sh

Number18-tong commented 1 year ago

add parameter --frames 15 in run_image2video.sh

Thanks a lot

Number18-tong commented 1 year ago

add parameter --frames 15 in run_image2video.sh

I've tried, but it doesn't work for me. I found that the attention.py has a bug in line 123 as bellows, and after I change the "out" into "out_ip", the error is fixed. 企业微信截图_1699011443451

Mozer commented 1 year ago

Thanks! Now it's working.

scutpaul commented 1 year ago

Thanks to @Number18-tong. This issue arises in the forward function when xformers are not available, and we'll fix it in a recent commit!