FluxAttnProcessor.call() got an unexpected keyword argument external_query
Hi, thanks for the great work!
I encountered an error when running the project. It seems that the FluxAttnProcessor in my installed version of diffusers does not support the external_query argument.
Error
The error occurs at the following call:
return self.processor(
self,
hidden_states,
external_query=external_query,
encoder_hidden_states=encoder_hidden_states,
attention_mask=attention_mask,
wtext=wtext,
**cross_attention_kwargs,
)
Runtime error:
FluxAttnProcessor.__call__() got an unexpected keyword argument 'external_query'
My Investigation
I checked the implementation of FluxAttnProcessor in:
diffusers/models/transformers/transformer_flux.py
The definition in my environment is:
class FluxAttnProcessor:
_attention_backend = None
def __init__(self):
if not hasattr(F, "scaled_dot_product_attention"):
raise ImportError(
f"{self.__class__.__name__} requires PyTorch 2.0. Please upgrade your pytorch version."
)
def __call__(
self,
attn: "FluxAttention",
hidden_states: torch.Tensor,
encoder_hidden_states: torch.Tensor = None,
attention_mask: Optional[torch.Tensor] = None,
image_rotary_emb: Optional[torch.Tensor] = None,
) -> torch.Tensor:
As shown above, external_query is not included in the function arguments, which leads to the error.
Environment
- diffusers:
0.35.0
- k-diffusion:
0.1.1.post1
Question
Has this issue been encountered before?
Is the project expecting a custom or modified version of diffusers, or a specific diffusers version/commit where FluxAttnProcessor supports external_query?
Any guidance would be appreciated. Thanks!
FluxAttnProcessor.call() got an unexpected keyword argument
external_queryHi, thanks for the great work!
I encountered an error when running the project. It seems that the
FluxAttnProcessorin my installed version ofdiffusersdoes not support theexternal_queryargument.Error
The error occurs at the following call:
Runtime error:
My Investigation
I checked the implementation of
FluxAttnProcessorin:The definition in my environment is:
As shown above,
external_queryis not included in the function arguments, which leads to the error.Environment
0.35.00.1.1.post1Question
Has this issue been encountered before?
Is the project expecting a custom or modified version of diffusers, or a specific diffusers version/commit where
FluxAttnProcessorsupportsexternal_query?Any guidance would be appreciated. Thanks!