Skip to content

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

@bghira
Copy link
Contributor

bghira commented Nov 30, 2024

this is incomplete. more changes are required to make use of the text encoder attn masking since it's being combined with the image tokens.

@bonlime
Copy link
Contributor

bonlime commented Dec 3, 2024

Thumbs up to this request. Diffusers is not only a set of pipelines, but also a library of use-full components, even if currently there is no diffusers pipeline that uses attention masking for flux, it doesn't mean it shouldn't be passed. I personally have a flux pipeline that requires passing attention mask and currently had to copy-paste existing attn processor only to start using this argument

@bghira
Copy link
Contributor

bghira commented Dec 3, 2024

i have code to do attn masking in flux and would like it to have feature parity with what Diffusers will do. hence this is incomplete.there is more than just passing args in using generic parameter names. you can use image_attention_mask and encoder_attention_mask and fill with ones if encoder mask is supplied but an image mask isnt.

however i think more importantly there is a fundamental misapplication of attention masking happening here, because it is not for re-weighting inputs.

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

@github-actions github-actions bot added the stale Issues that haven't received updates label Dec 29, 2024
@bonlime
Copy link
Contributor

bonlime commented Jan 10, 2025

This has been closed by #10122

@bghira
Copy link
Contributor

bghira commented Jan 10, 2025

i'll just keep mentioning that it's an incomplete fix that has been merged and that this is not yet resolved

@github-actions github-actions bot removed the stale Issues that haven't received updates label Jan 10, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2025

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

@github-actions github-actions bot added the stale Issues that haven't received updates label Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale Issues that haven't received updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

attention mask for transformer Flux

3 participants