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
08d4fb6e
Unverified
Commit
08d4fb6e
authored
Oct 05, 2022
by
Pierre LeMoine
Committed by
GitHub
Oct 05, 2022
Browse files
[dreambooth] Using already created `Path` in dataset (#681)
using already created `Path` in dataset
parent
a8a3a20d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/dreambooth/train_dreambooth.py
examples/dreambooth/train_dreambooth.py
+1
-1
No files found.
examples/dreambooth/train_dreambooth.py
View file @
08d4fb6e
...
...
@@ -244,7 +244,7 @@ class DreamBoothDataset(Dataset):
if
class_data_root
is
not
None
:
self
.
class_data_root
=
Path
(
class_data_root
)
self
.
class_data_root
.
mkdir
(
parents
=
True
,
exist_ok
=
True
)
self
.
class_images_path
=
list
(
Path
(
class_data_root
)
.
iterdir
())
self
.
class_images_path
=
list
(
self
.
class_data_root
.
iterdir
())
self
.
num_class_images
=
len
(
self
.
class_images_path
)
self
.
_length
=
max
(
self
.
num_class_images
,
self
.
num_instance_images
)
self
.
class_prompt
=
class_prompt
...
...
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