Skip to content
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

[Core] add QKV fusion to AuraFlow and PixArt Sigma #8952

Merged
merged 17 commits into from
Aug 6, 2024
Merged

[Core] add QKV fusion to AuraFlow and PixArt Sigma #8952

merged 17 commits into from
Aug 6, 2024

Conversation

sayakpaul
Copy link
Member

What does this PR do?

As a follow-up of #8829, I decided to give QKV fusion a try for AuraFlow and PixArt-Sigma when doing int8 quantization. Some nice gains on an H100:

PixArt

  • Without fusion: 1.499 seconds
  • With fusion: 1.455 seconds

AuraFlow

  • Without fusion: 13.850 seconds
  • With fusion: 13.707 seconds

@sayakpaul sayakpaul requested a review from yiyixuxu July 24, 2024 04:44
@HuggingFaceDocBuilderDev

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.

Copy link
Collaborator

@yiyixuxu yiyixuxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice! thank you

Comment on lines +1282 to +1283
*args,
**kwargs,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we do not need them, no?

Suggested change
*args,
**kwargs,

@sayakpaul
Copy link
Member Author

@yiyixuxu because we have

attention_mask=attention_mask,

I had to do:
33310ef

LMK if you have other ideas to counter it. Without it, we will have:
https://github.com/huggingface/diffusers/actions/runs/10104445763/job/27943457611?pr=8952#step:7:17774

@sayakpaul
Copy link
Member Author

@yiyixuxu a friendly ping.

@yiyixuxu yiyixuxu merged commit 52f1378 into main Aug 6, 2024
18 checks passed
@yiyixuxu yiyixuxu deleted the qkv-rest branch August 6, 2024 00:09
@yiyixuxu
Copy link
Collaborator

yiyixuxu commented Aug 6, 2024

@sayakpaul you're right thank you!

sayakpaul added a commit that referenced this pull request Dec 23, 2024
* add fusion support to pixart

* add to auraflow.

* add tests

* apply review feedback.

* add back args and kwargs

* style
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