Skip to content

Commit 1066fe4

Browse files
ghunkinssayakpaul
andauthored
🤫 Quiet IP Adapter Mask Warning (#8475)
* quiet attn parameters * fix lint * make style && make quality --------- Co-authored-by: Sayak Paul <[email protected]>
1 parent d38f69e commit 1066fe4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/diffusers/models/attention_processor.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,10 @@ def forward(
539539
# For standard processors that are defined here, `**cross_attention_kwargs` is empty
540540

541541
attn_parameters = set(inspect.signature(self.processor.__call__).parameters.keys())
542-
unused_kwargs = [k for k, _ in cross_attention_kwargs.items() if k not in attn_parameters]
542+
quiet_attn_parameters = {"ip_adapter_masks"}
543+
unused_kwargs = [
544+
k for k, _ in cross_attention_kwargs.items() if k not in attn_parameters and k not in quiet_attn_parameters
545+
]
543546
if len(unused_kwargs) > 0:
544547
logger.warning(
545548
f"cross_attention_kwargs {unused_kwargs} are not expected by {self.processor.__class__.__name__} and will be ignored."

0 commit comments

Comments
 (0)