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
1d1f648c
Unverified
Commit
1d1f648c
authored
May 27, 2023
by
Leon Lin
Committed by
GitHub
May 26, 2023
Browse files
fix dreambooth attention mask (#3541)
parent
67cf0445
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
examples/dreambooth/train_dreambooth.py
examples/dreambooth/train_dreambooth.py
+1
-0
No files found.
examples/dreambooth/train_dreambooth.py
View file @
1d1f648c
...
@@ -681,6 +681,7 @@ def collate_fn(examples, with_prior_preservation=False):
...
@@ -681,6 +681,7 @@ def collate_fn(examples, with_prior_preservation=False):
}
}
if
has_attention_mask
:
if
has_attention_mask
:
attention_mask
=
torch
.
cat
(
attention_mask
,
dim
=
0
)
batch
[
"attention_mask"
]
=
attention_mask
batch
[
"attention_mask"
]
=
attention_mask
return
batch
return
batch
...
...
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