Skip to content

Commit

Permalink
Fix bug with controlnet.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Jun 24, 2023
1 parent c9f5d5b commit 78d8035
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion comfy/ldm/modules/attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,10 @@ def _forward(self, x, context=None, transformer_options={}):
for p in patch:
n, context_attn1, value_attn1 = p(n, context_attn1, value_attn1, extra_options)

transformer_block = (block[0], block[1], block_index)
if block is not None:
transformer_block = (block[0], block[1], block_index)
else:
transformer_block = None
attn1_replace_patch = transformer_patches_replace.get("attn1", {})
block_attn1 = transformer_block
if block_attn1 not in attn1_replace_patch:
Expand Down

0 comments on commit 78d8035

Please sign in to comment.