Changed some PIL stuff to use resampling to avoid some warnings on the console

This commit is contained in:
ZeroCool940711 2022-09-24 18:06:24 -07:00
parent 9c12a6a322
commit d7d0ad97c3

View File

@ -316,10 +316,10 @@ class TextualInversionDataset(Dataset):
self._length = self.num_images * repeats self._length = self.num_images * repeats
self.interpolation = { self.interpolation = {
"linear": PIL.Image.LINEAR, "linear": PIL.Image.Resampling.BILINEAR,
"bilinear": PIL.Image.BILINEAR, "bilinear": PIL.Image.Resampling.BILINEAR,
"bicubic": PIL.Image.BICUBIC, "bicubic": PIL.Image.Resampling.BICUBIC,
"lanczos": PIL.Image.LANCZOS, "lanczos": PIL.Image.Resampling.LANCZOS,
}[interpolation] }[interpolation]
self.templates = templates self.templates = templates