chore: ruff check - fix flake8-bugbear

This commit is contained in:
psychedelicious
2023-11-11 10:51:21 +11:00
parent 3a136420d5
commit 99a8ebe3a0
27 changed files with 48 additions and 48 deletions

View File

@ -130,7 +130,7 @@ class IPAttnProcessor2_0(torch.nn.Module):
assert ip_adapter_image_prompt_embeds is not None
assert len(ip_adapter_image_prompt_embeds) == len(self._weights)
for ipa_embed, ipa_weights, scale in zip(ip_adapter_image_prompt_embeds, self._weights, self._scales):
for ipa_embed, ipa_weights, scale in zip(ip_adapter_image_prompt_embeds, self._weights, self._scales, strict=True):
# The batch dimensions should match.
assert ipa_embed.shape[0] == encoder_hidden_states.shape[0]
# The token_len dimensions should match.