-
Couldn't load subscription status.
- Fork 6.4k
Fix the bug that joint_attention_kwargs is not passed to the FLUX's transformer attention processors
#9517
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
Fix the bug that joint_attention_kwargs is not passed to the FLUX's transformer attention processors
#9517
Changes from 3 commits
8a1d136
b12ee92
9509764
a89fd51
5104098
8b0be8d
9ed5284
c9d624b
b6128a4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -83,11 +83,12 @@ def forward( | |||||
| hidden_states: torch.FloatTensor, | ||||||
| temb: torch.FloatTensor, | ||||||
| image_rotary_emb=None, | ||||||
| joint_attention_kwargs=None, | ||||||
| ): | ||||||
| residual = hidden_states | ||||||
| norm_hidden_states, gate = self.norm(hidden_states, emb=temb) | ||||||
| mlp_hidden_states = self.act_mlp(self.proj_mlp(norm_hidden_states)) | ||||||
|
|
||||||
| joint_attention_kwargs = joint_attention_kwargs if joint_attention_kwargs is not None else {} | ||||||
| attn_output = self.attn( | ||||||
| hidden_states=norm_hidden_states, | ||||||
| image_rotary_emb=image_rotary_emb, | ||||||
|
|
@@ -161,6 +162,7 @@ def forward( | |||||
| encoder_hidden_states: torch.FloatTensor, | ||||||
| temb: torch.FloatTensor, | ||||||
| image_rotary_emb=None, | ||||||
| joint_attention_kwargs={}, | ||||||
|
||||||
| joint_attention_kwargs={}, | |
| joint_attention_kwargs=None, |
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.
should we pass this to
attntoo?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.
Yes! I think it will be useful for other trial!