Skip to content

Conversation

@a-r-r-o-w
Copy link
Contributor

@a-r-r-o-w a-r-r-o-w commented Nov 19, 2024

What does this PR do?

CogVideoX 1.5 models use a slightly different RoPE implementation compared to 1.0. When we merged the CogVideoX 1.5 PR, this was the status of RoPE implementations:

  • 1.0 T2V and I2V used 1.0 RoPE implementation
  • 1.5 I2V used 1.5 RoPE implementation
  • 1.5 T2V used 1.0 RoPE implementation (inconsistent)

All models still worked as expected and there weren't any bugs. This PR just makes sure that 1.5 T2V uses 1.5 RoPE implementation (the reason why it still worked before is because linspace and slice implementation are equivalent at the 1360x768 resolution, which is the only resolution 1.5 T2V supports, but differ otherwise). The 1.5 T2V needs to use sliced implementation though to keep things consistent with the original code base (even though the outputs match with 1.0 implementation).

The config for 1.5 T2V on the official checkpoints has been correctly updated (https://huggingface.co/THUDM/CogVideoX1.5-5B/commit/6b80d8556f820bf58e4e9719ec71450aff55c246), but unless we also make these changes, it will become incompatible. So requesting a speedy merge @DN6

@a-r-r-o-w a-r-r-o-w requested a review from DN6 November 19, 2024 11:16
@a-r-r-o-w
Copy link
Contributor Author

Gentle ping to @zRzRzRzRzRzRzR. Maybe @kijai as well to reflect downstream but I'm assuming you've done that already

@a-r-r-o-w
Copy link
Contributor Author

Running slow tests now to confirm all checkpoints still work as expected

@a-r-r-o-w
Copy link
Contributor Author

a-r-r-o-w commented Nov 19, 2024

All outputs are matching for 1.0 and 1.5 implementations, so looks good to merge. Failing test is unrelated

@a-r-r-o-w a-r-r-o-w merged commit 0583a8d into main Nov 19, 2024
17 of 18 checks passed
@a-r-r-o-w a-r-r-o-w deleted the update-cog-rope branch November 19, 2024 12:10
sayakpaul pushed a commit that referenced this pull request Dec 23, 2024
* update cogvideox rope implementation

* apply suggestions from review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants