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
debc74f4
Unverified
Commit
debc74f4
authored
Dec 28, 2022
by
Patrick von Platen
Committed by
GitHub
Dec 28, 2022
Browse files
[Versatile Diffusion] Fix cross_attention_kwargs (#1849)
fix versatile
parent
2ba42aa9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
src/diffusers/models/attention.py
src/diffusers/models/attention.py
+8
-1
No files found.
src/diffusers/models/attention.py
View file @
debc74f4
...
@@ -703,7 +703,13 @@ class DualTransformer2DModel(nn.Module):
...
@@ -703,7 +703,13 @@ class DualTransformer2DModel(nn.Module):
self
.
transformer_index_for_condition
=
[
1
,
0
]
self
.
transformer_index_for_condition
=
[
1
,
0
]
def
forward
(
def
forward
(
self
,
hidden_states
,
encoder_hidden_states
,
timestep
=
None
,
attention_mask
=
None
,
return_dict
:
bool
=
True
self
,
hidden_states
,
encoder_hidden_states
,
timestep
=
None
,
attention_mask
=
None
,
cross_attention_kwargs
=
None
,
return_dict
:
bool
=
True
,
):
):
"""
"""
Args:
Args:
...
@@ -738,6 +744,7 @@ class DualTransformer2DModel(nn.Module):
...
@@ -738,6 +744,7 @@ class DualTransformer2DModel(nn.Module):
input_states
,
input_states
,
encoder_hidden_states
=
condition_state
,
encoder_hidden_states
=
condition_state
,
timestep
=
timestep
,
timestep
=
timestep
,
cross_attention_kwargs
=
cross_attention_kwargs
,
return_dict
=
False
,
return_dict
=
False
,
)[
0
]
)[
0
]
encoded_states
.
append
(
encoded_state
-
input_states
)
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