Unverified Commit 1066fe4c authored by Greg Hunkins's avatar Greg Hunkins Committed by GitHub
Browse files

🤫 Quiet IP Adapter Mask Warning (#8475)



* quiet attn parameters

* fix lint

* make style && make quality

---------
Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
parent d38f69ea
......@@ -539,7 +539,10 @@ class Attention(nn.Module):
# For standard processors that are defined here, `**cross_attention_kwargs` is empty
attn_parameters = set(inspect.signature(self.processor.__call__).parameters.keys())
unused_kwargs = [k for k, _ in cross_attention_kwargs.items() if k not in attn_parameters]
quiet_attn_parameters = {"ip_adapter_masks"}
unused_kwargs = [
k for k, _ in cross_attention_kwargs.items() if k not in attn_parameters and k not in quiet_attn_parameters
]
if len(unused_kwargs) > 0:
logger.warning(
f"cross_attention_kwargs {unused_kwargs} are not expected by {self.processor.__class__.__name__} and will be ignored."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment