diff --git a/scripts/textual_inversion.py b/scripts/textual_inversion.py index 46dc866..74ac99c 100644 --- a/scripts/textual_inversion.py +++ b/scripts/textual_inversion.py @@ -316,10 +316,10 @@ class TextualInversionDataset(Dataset): self._length = self.num_images * repeats self.interpolation = { - "linear": PIL.Image.LINEAR, - "bilinear": PIL.Image.BILINEAR, - "bicubic": PIL.Image.BICUBIC, - "lanczos": PIL.Image.LANCZOS, + "linear": PIL.Image.Resampling.BILINEAR, + "bilinear": PIL.Image.Resampling.BILINEAR, + "bicubic": PIL.Image.Resampling.BICUBIC, + "lanczos": PIL.Image.Resampling.LANCZOS, }[interpolation] self.templates = templates