[dreambooth] Using already created `Path` in dataset (#681)
using already created `Path` in dataset
This commit is contained in:
parent
a8a3a20d36
commit
08d4fb6e9f
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue