Skip to content

Attention mask for transformer flux #10051

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

Closed

Conversation

christopher5106
Copy link

Unused params attention_mask in transformer flux attention processors is useful to reweight prompt or image prompt.

Fixes #10025

@yiyixuxu @sayakpaul

@christopher5106 christopher5106 marked this pull request as draft November 29, 2024 10:31
@@ -1762,7 +1762,9 @@ def __call__(
query = apply_rotary_emb(query, image_rotary_emb)
key = apply_rotary_emb(key, image_rotary_emb)

hidden_states = F.scaled_dot_product_attention(query, key, value, dropout_p=0.0, is_causal=False)
hidden_states = F.scaled_dot_product_attention(
Copy link
Collaborator

Choose a reason for hiding this comment

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

i see you added this to F.scaled_dot_product_attention
but just wonder how would this help? it is currently not passing down from the flux transformer to attenton_processor

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.

attention mask for transformer Flux
2 participants