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
renzhc
diffusers_dcu
Commits
b267d285
Unverified
Commit
b267d285
authored
Dec 19, 2022
by
Patrick von Platen
Committed by
GitHub
Dec 19, 2022
Browse files
[Versatile] fix attention mask (#1763)
parent
c7b4acfb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/diffusers/models/attention.py
src/diffusers/models/attention.py
+1
-1
No files found.
src/diffusers/models/attention.py
View file @
b267d285
...
...
@@ -959,6 +959,7 @@ class DualTransformer2DModel(nn.Module):
encoded_states
=
[]
tokens_start
=
0
# attention_mask is not used yet
for
i
in
range
(
2
):
# for each of the two transformers, pass the corresponding condition tokens
condition_state
=
encoder_hidden_states
[:,
tokens_start
:
tokens_start
+
self
.
condition_lengths
[
i
]]
...
...
@@ -967,7 +968,6 @@ class DualTransformer2DModel(nn.Module):
input_states
,
encoder_hidden_states
=
condition_state
,
timestep
=
timestep
,
attention_mask
=
attention_mask
,
return_dict
=
False
,
)[
0
]
encoded_states
.
append
(
encoded_state
-
input_states
)
...
...
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