ZhouZJ36DL commited on
Commit
67613ae
·
verified ·
1 Parent(s): 6a8e8f4

Update src/flux/modules/layers.py

Browse files
Files changed (1) hide show
  1. src/flux/modules/layers.py +2 -2
src/flux/modules/layers.py CHANGED
@@ -186,8 +186,8 @@ class DoubleStreamBlock(nn.Module):
186
  # if using adaptive attention guidance during samping
187
  if not info['inverse'] and 'attn_guidance' in info['editing_strategy']:
188
  attn = adaptive_attention(q, k, v, pe=pe, txt_shape=txt.shape[1], img_shape=img.shape[1], cur_step=cur_step, cur_block=self.cur_block, info=info)
189
-
190
- attn = attention(q, k, v, pe=pe)
191
 
192
  txt_attn, img_attn = attn[:, : txt.shape[1]], attn[:, txt.shape[1] :]
193
 
 
186
  # if using adaptive attention guidance during samping
187
  if not info['inverse'] and 'attn_guidance' in info['editing_strategy']:
188
  attn = adaptive_attention(q, k, v, pe=pe, txt_shape=txt.shape[1], img_shape=img.shape[1], cur_step=cur_step, cur_block=self.cur_block, info=info)
189
+ else:
190
+ attn = attention(q, k, v, pe=pe)
191
 
192
  txt_attn, img_attn = attn[:, : txt.shape[1]], attn[:, txt.shape[1] :]
193