AILab-CVC / VideoCrafter

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

shape mismatch when running default example #38

Closed aiXander closed 11 months ago

aiXander commented 11 months 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 11 months ago

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

Mozer commented 11 months ago

add parameter --frames 15 in run_image2video.sh

Number18-tong commented 11 months ago

add parameter --frames 15 in run_image2video.sh

Thanks a lot

Number18-tong commented 11 months 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 11 months ago

Thanks! Now it's working.

scutpaul commented 11 months 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!