-
Notifications
You must be signed in to change notification settings - Fork 6.5k
feat: enable attention dispatch for huanyuan video #12591
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! It would be nice to have some explanation of the change of dims being introduced in this PR.
| [ | ||
| apply_rotary_emb(query[:, :, : -encoder_hidden_states.shape[1]], image_rotary_emb), | ||
| query[:, :, -encoder_hidden_states.shape[1] :], | ||
| apply_rotary_emb( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's happening here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since transpose is no longer needed, at this point seq_len is located in dim=1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Thanks for your contributions! |
enable attention dispatch for huanyuan video, adapted from:
https://github.com/huggingface/diffusers/blob/ac5a1e28fc9cc233863bcfb2abb9eef6807f156f/src/diffusers/models/transformers/transformer_hunyuanimage.py#L46C7-L46C32
Example
@yiyixuxu pipelines