From 08d4fb6e9f37fa79b1ab1a621dde1da2db4970dd Mon Sep 17 00:00:00 2001 From: Pierre LeMoine Date: Wed, 5 Oct 2022 12:14:30 +0200 Subject: [PATCH] [dreambooth] Using already created `Path` in dataset (#681) using already created `Path` in dataset --- examples/dreambooth/train_dreambooth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/dreambooth/train_dreambooth.py b/examples/dreambooth/train_dreambooth.py index 73db1d6f..740724c4 100644 --- a/examples/dreambooth/train_dreambooth.py +++ b/examples/dreambooth/train_dreambooth.py @@ -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