-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
NPU adaption for FLUX #10465
base: main
Are you sure you want to change the base?
NPU adaption for FLUX #10465
Conversation
@sayakpaul Please take a look at this Flux adaption. Thank you! |
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.
Changes to the training script look good to me. Off to @yiyixuxu for the other changes.
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. |
@@ -140,7 +141,10 @@ def __init__( | |||
self.norm1_context = AdaLayerNormZero(dim) | |||
|
|||
if hasattr(F, "scaled_dot_product_attention"): | |||
processor = FluxAttnProcessor2_0() |
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.
let's keep the default logic simple i.e. remove the changes from this file
you can use NPU with set_attn_processor
, no?
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.
@yiyixuxu In the attention processor, it has NPU FA, but only with AttnProcessorNPU. Or do you want me to add a function in attention_processor.py to change the processor there? I think right now the selection is only in the init, so it shouldn't be any logic changes. Please let me know what you think so that I can modify based on that. Thanks
In the attention processor, it has NPU FA, but only with AttnProcessorNPU. Or do you want me to add a function in attention_processor.py to change the processor there? I think right now the selection is only in the init, so it shouldn't be any logic changes. Please let me know what you think so that I can modify based on that. Thanks
What does this PR do?
Added Flash Attention for FLUX
Fixed issue in Flux Controlnet when using enable flash attention
Before submitting
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.