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
32a5d70c
Unverified
Commit
32a5d70c
authored
Dec 19, 2022
by
Anton Lozhkov
Committed by
GitHub
Dec 19, 2022
Browse files
Support attn2==None for xformers (#1759)
parent
429e5449
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
src/diffusers/models/attention.py
src/diffusers/models/attention.py
+2
-1
No files found.
src/diffusers/models/attention.py
View file @
32a5d70c
...
...
@@ -473,6 +473,7 @@ class BasicTransformerBlock(nn.Module):
except
Exception
as
e
:
raise
e
self
.
attn1
.
_use_memory_efficient_attention_xformers
=
use_memory_efficient_attention_xformers
if
self
.
attn2
is
not
None
:
self
.
attn2
.
_use_memory_efficient_attention_xformers
=
use_memory_efficient_attention_xformers
def
forward
(
self
,
hidden_states
,
encoder_hidden_states
=
None
,
timestep
=
None
,
attention_mask
=
None
):
...
...
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