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
ModelZoo
Open-Sora_pytorch
Commits
9180c729
Commit
9180c729
authored
Aug 30, 2024
by
mashun1
Browse files
Update blocks.py
parent
c1676293
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
opensora/models/layers/blocks.py
opensora/models/layers/blocks.py
+1
-1
No files found.
opensora/models/layers/blocks.py
View file @
9180c729
...
...
@@ -282,7 +282,7 @@ class MultiHeadCrossAttention(nn.Module):
attn_bias
=
None
if
mask
is
not
None
:
attn_bias
=
xformers
.
ops
.
fmha
.
BlockDiagonalMask
.
from_seqlens
([
N
]
*
B
,
mask
)
x
=
xformers
.
ops
.
memory_efficient_attention
(
q
,
k
,
v
,
p
=
self
.
attn_drop
.
p
,
attn_bias
=
attn_bias
)
x
=
xformers
.
ops
.
memory_efficient_attention
(
q
,
k
,
v
,
p
=
self
.
attn_drop
.
p
,
attn_bias
=
attn_bias
,
op
=
xformers
.
ops
.
fmha
.
MemoryEfficientAttentionFlashAttentionOp
)
x
=
x
.
view
(
B
,
-
1
,
C
)
x
=
self
.
proj
(
x
)
...
...
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