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
I2VGen-XL_pytorch
Commits
40f7870f
Commit
40f7870f
authored
Sep 04, 2024
by
mashun1
Browse files
Update util.py
parent
42f6a485
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
tools/modules/unet/util.py
tools/modules/unet/util.py
+2
-2
No files found.
tools/modules/unet/util.py
View file @
40f7870f
...
...
@@ -225,7 +225,7 @@ class MemoryEfficientCrossAttention(nn.Module):
self
.
to_v
=
nn
.
Linear
(
context_dim
,
inner_dim
,
bias
=
False
)
self
.
to_out
=
nn
.
Sequential
(
nn
.
Linear
(
inner_dim
,
query_dim
),
nn
.
Dropout
(
dropout
))
self
.
attention_op
:
Optional
[
Any
]
=
None
self
.
attention_op
:
Optional
[
Any
]
=
xformers
.
ops
.
fmha
.
MemoryEfficientAttentionFlashAttentionOp
def
forward
(
self
,
x
,
context
=
None
,
mask
=
None
):
q
=
self
.
to_q
(
x
)
...
...
@@ -441,7 +441,7 @@ class MemoryEfficientCrossAttention_attemask(nn.Module):
self
.
to_v
=
nn
.
Linear
(
context_dim
,
inner_dim
,
bias
=
False
)
self
.
to_out
=
nn
.
Sequential
(
nn
.
Linear
(
inner_dim
,
query_dim
),
nn
.
Dropout
(
dropout
))
self
.
attention_op
:
Optional
[
Any
]
=
None
self
.
attention_op
:
Optional
[
Any
]
=
xformers
.
ops
.
fmha
.
MemoryEfficientAttentionFlashAttentionOp
def
forward
(
self
,
x
,
context
=
None
,
mask
=
None
):
q
=
self
.
to_q
(
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