Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
ac7d8cfa
Commit
ac7d8cfa
authored
Oct 11, 2023
by
comfyanonymous
Browse files
Allow attn_mask in attention_pytorch.
parent
1a4bd9e9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
comfy/ldm/modules/attention.py
comfy/ldm/modules/attention.py
+1
-1
No files found.
comfy/ldm/modules/attention.py
View file @
ac7d8cfa
...
...
@@ -284,7 +284,7 @@ def attention_pytorch(q, k, v, heads, mask=None):
(
q
,
k
,
v
),
)
out
=
torch
.
nn
.
functional
.
scaled_dot_product_attention
(
q
,
k
,
v
,
attn_mask
=
None
,
dropout_p
=
0.0
,
is_causal
=
False
)
out
=
torch
.
nn
.
functional
.
scaled_dot_product_attention
(
q
,
k
,
v
,
attn_mask
=
mask
,
dropout_p
=
0.0
,
is_causal
=
False
)
if
exists
(
mask
):
raise
NotImplementedError
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment