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
5b933382
Unverified
Commit
5b933382
authored
Jan 26, 2024
by
Andrew Ishutin
Committed by
GitHub
Jan 26, 2024
Browse files
fix custom diffusion training with concept list (#6710)
Co-authored-by:
Sayak Paul
<
spsayakpaul@gmail.com
>
parent
7c1c705f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/custom_diffusion/train_custom_diffusion.py
examples/custom_diffusion/train_custom_diffusion.py
+1
-1
No files found.
examples/custom_diffusion/train_custom_diffusion.py
View file @
5b933382
...
@@ -753,7 +753,7 @@ def main(args):
...
@@ -753,7 +753,7 @@ def main(args):
num_new_images
=
args
.
num_class_images
-
cur_class_images
num_new_images
=
args
.
num_class_images
-
cur_class_images
logger
.
info
(
f
"Number of class images to sample:
{
num_new_images
}
."
)
logger
.
info
(
f
"Number of class images to sample:
{
num_new_images
}
."
)
sample_dataset
=
PromptDataset
(
args
.
class_prompt
,
num_new_images
)
sample_dataset
=
PromptDataset
(
concept
[
"
class_prompt
"
]
,
num_new_images
)
sample_dataloader
=
torch
.
utils
.
data
.
DataLoader
(
sample_dataset
,
batch_size
=
args
.
sample_batch_size
)
sample_dataloader
=
torch
.
utils
.
data
.
DataLoader
(
sample_dataset
,
batch_size
=
args
.
sample_batch_size
)
sample_dataloader
=
accelerator
.
prepare
(
sample_dataloader
)
sample_dataloader
=
accelerator
.
prepare
(
sample_dataloader
)
...
...
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