From 76efa00de305b4656e41354305cca73f84289aa6 Mon Sep 17 00:00:00 2001 From: harubaru Date: Sat, 15 Oct 2022 18:43:28 -0700 Subject: [PATCH] fix deprecation warnings in dataloader --- ldm/data/localdanboorubase.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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)