Skip to content

Commit 22f637b

Browse files
hipsterusernamepsychedelicious
authored andcommitted
ruff ruff
1 parent 5d192ab commit 22f637b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

invokeai/backend/stable_diffusion/diffusion/unet_attention_patcher.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ def _prepare_attention_processors(self, unet: UNet2DConditionModel):
4444
for block in ip_adapter["target_blocks"]:
4545
if block in name:
4646
skip = False
47-
negative = ip_adapter["method"] == "style_precise" and (block == "down_blocks.2.attentions.1" or block == "down_blocks.2" or block == "mid_block")
47+
negative = ip_adapter["method"] == "style_precise" and (
48+
block == "down_blocks.2.attentions.1"
49+
or block == "down_blocks.2"
50+
or block == "mid_block"
51+
)
4852
break
4953
ip_adapter_attention_weights: IPAdapterAttentionWeights = IPAdapterAttentionWeights(
5054
ip_adapter_weights=ip_adapter_weights, skip=skip, negative=negative

0 commit comments

Comments
 (0)