Spaces:
Running
on
Zero
Running
on
Zero
Update src/flux/modules/layers.py
Browse files
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 |
-
|
| 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 |
|