diff --git a/ldm/data/localdanboorubase.py b/ldm/data/localdanboorubase.py index bd3e765..1be6bbe 100644 --- a/ldm/data/localdanboorubase.py +++ b/ldm/data/localdanboorubase.py @@ -140,10 +140,10 @@ class LocalDanbooruBase(Dataset): print(f'image-caption map has {len(self.examples.keys())} examples') self.size = size - self.interpolation = {"linear": PIL.Image.LINEAR, - "bilinear": PIL.Image.BILINEAR, - "bicubic": PIL.Image.BICUBIC, - "lanczos": PIL.Image.LANCZOS, + self.interpolation = {"linear": PIL.Image.Resampling.BILINEAR, + "bilinear": PIL.Image.Resampling.BILINEAR, + "bicubic": PIL.Image.Resampling.BICUBIC, + "lanczos": PIL.Image.Resampling.LANCZOS, }[interpolation] self.flip = transforms.RandomHorizontalFlip(p=flip_p)