CogVideo icon indicating copy to clipboard operation
CogVideo copied to clipboard

Does CogVideoX1.5-5B I2V support Portrait instead of Landscape?

Open MyNiuuu opened this issue 9 months ago • 4 comments

MyNiuuu avatar Apr 04 '25 11:04 MyNiuuu

Support, his resolution is free, you can set it to portrait as long as the width is not less than 768.

zRzRzRzRzRzRzR avatar Apr 05 '25 09:04 zRzRzRzRzRzRzR

I found that if I change height larger than width, then I have to swap sample_height and sample_width in transformer/config.json or errors will occur in the rope positional embedding part. I think the reason is that the code logic of rope positional embedding assumes that sample_width is larger than sample_height, which is set to 170 and 96 respectively. After I swap sample_height and sample_width, there will be no errors for portrait inference.

MyNiuuu avatar Apr 05 '25 09:04 MyNiuuu

I am not sure this will harm the generation results or not.

MyNiuuu avatar Apr 05 '25 09:04 MyNiuuu