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
OpenDAS
diffusers
Commits
c6ae8837
Unverified
Commit
c6ae8837
authored
May 29, 2023
by
Sayak Paul
Committed by
GitHub
May 29, 2023
Browse files
remove print statements from attention processor. (#3592)
parent
5559d042
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
4 deletions
+0
-4
src/diffusers/models/attention_processor.py
src/diffusers/models/attention_processor.py
+0
-4
No files found.
src/diffusers/models/attention_processor.py
View file @
c6ae8837
...
...
@@ -222,9 +222,6 @@ class Attention(nn.Module):
)
processor
.
load_state_dict
(
self
.
processor
.
state_dict
())
processor
.
to
(
self
.
processor
.
to_q_lora
.
up
.
weight
.
device
)
print
(
f
"is_lora is set to
{
is_lora
}
, type: LoRAXFormersAttnProcessor:
{
isinstance
(
processor
,
LoRAXFormersAttnProcessor
)
}
"
)
elif
is_custom_diffusion
:
processor
=
CustomDiffusionXFormersAttnProcessor
(
train_kv
=
self
.
processor
.
train_kv
,
...
...
@@ -262,7 +259,6 @@ class Attention(nn.Module):
# We use the AttnProcessor2_0 by default when torch 2.x is used which uses
# torch.nn.functional.scaled_dot_product_attention for native Flash/memory_efficient_attention
# but only if it has the default `scale` argument. TODO remove scale_qk check when we move to torch 2.1
print
(
"Still defaulting to: AttnProcessor2_0 :O"
)
processor
=
(
AttnProcessor2_0
()
if
hasattr
(
F
,
"scaled_dot_product_attention"
)
and
self
.
scale_qk
...
...
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