-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Flax: Flip sin to cos in time embeddings #1149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This was assumed in the previous implementation, but now the default is the opposite. Fixes #1145.
|
The documentation is not available anymore as the PR was closed or merged. |
|
I'm running the slow tests locally. |
|
ah damn! so sorry! My bad! I believe you are right this is the reason. I do not think this function is called by itself... to be sure shall we set the default of the function to be True? |
No worries! These issues should be easier to catch going forward with the new TPU tests. Regarding making it the default, I'm not sure because the default is |
Yes we should indeed mirror the PyTorch behavior here |
|
In that case I can send a PR to add an option to the |
|
Ah sorry, I didn't do a thoughout check - will take a look now! |
|
Actually, let's maybe leave the PR as is for now since it solves the problem. In general, it's nicer to mirror PyTorch API - but we need to be sure that it doesn't break anything and we also shouldn't add features just for the sake of having the same API as PyTorch. So if we put the default to More generally though, I think it's better to not add new function arguments just for the sake of making Flax API similar to PyTorch. E.g. such a PR: https://github.com/huggingface/diffusers/pull/1081/files only really makes sense if it enables new functionality for Flax/JAX which I think it didn't really there. Given that we have very low usage in Flax, let's not spend too much time on giving the API more features than it needs :-) I did a really bad job at reviewing #1081, so taking full responsibility here :-) Will do a patch release now - thanks for the quick fix @pcuenca and @kashif ! |
Flip sin to cos in t embeddings. This was assumed in the previous implementation, but now the default is the opposite. Fixes #1145.
Flip sin to cos in t embeddings. This was assumed in the previous implementation, but now the default is the opposite. Fixes huggingface#1145.
This was assumed in the previous implementation, but now (0b61cea) the default is the opposite.
Fixes #1145.