ali-vilab / videocomposer

Official repo for VideoComposer: Compositional Video Synthesis with Motion Controllability
https://videocomposer.github.io
MIT License
902 stars 81 forks source link

How to modify the resolution of generated video? #43

Open sheldonn2 opened 8 months ago

sheldonn2 commented 8 months ago

Very interesting job! When I used it, I found that the model could only generate videos with a resolution of 256. How should I modify the parameters to make the model generate videos with a higher resolution?

I tried changing the "resolution" parameter in the config, but it didn't work.

Looking forward to your reply, thank you!

agusgun commented 8 months ago

I don't think the pretrained model supports arbitrary resolution. You can try to change it manually by setting cfg.resolution=<YOUR_RESOLUTION> and cfg.misc_size=<YOUR_RESOLUTION>. But, if you see the model in unet_sd.py line 1230 for example, you need to change the AdaptiveAvgPool layer to use your specific resolution also. It may affect the performance.