From 5b54788842cdd7b342bd60d6944158009130b4d4 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Wed, 28 Sep 2022 15:05:30 +0200 Subject: Improved sample output and progress bars --- data/dreambooth/csv.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'data/dreambooth') diff --git a/data/dreambooth/csv.py b/data/dreambooth/csv.py index 14c13bb..85ed4a5 100644 --- a/data/dreambooth/csv.py +++ b/data/dreambooth/csv.py @@ -108,14 +108,14 @@ class CSVDataset(Dataset): else: self.class_data_root = None - self.interpolation = {"linear": PIL.Image.LINEAR, - "bilinear": PIL.Image.BILINEAR, - "bicubic": PIL.Image.BICUBIC, - "lanczos": PIL.Image.LANCZOS, + self.interpolation = {"linear": transforms.InterpolationMode.NEAREST, + "bilinear": transforms.InterpolationMode.BILINEAR, + "bicubic": transforms.InterpolationMode.BICUBIC, + "lanczos": transforms.InterpolationMode.LANCZOS, }[interpolation] self.image_transforms = transforms.Compose( [ - transforms.Resize(size, interpolation=transforms.InterpolationMode.BILINEAR), + transforms.Resize(size, interpolation=self.interpolation), transforms.CenterCrop(size) if center_crop else transforms.RandomCrop(size), transforms.RandomHorizontalFlip(), transforms.ToTensor(), -- cgit v1.2.3-70-g09d2