Mukosame / Anime2Sketch

A sketch extractor for anime/illustration.
MIT License
1.96k stars 163 forks source link

ValueError: Unknown resampling filter (InterpolationMode.BICUBIC). #28

Open geng-lee opened 2 years ago

geng-lee commented 2 years ago

ValueError: Unknown resampling filter (InterpolationMode.BICUBIC). Use Image.Resampling.NEAREST (0), Image.Resampling.LANCZOS (1), Image.Resampling.BILINEAR (2), Image.Resampling.BICUBIC (3), Image.Resampling.BOX (4) or Image.Resampling.HAMMING (5)

virtualramblas commented 2 years ago

Hi @geng-lee This error was happening to me as well today (previous releases of the original code worked properly when resizing the input images). This is simply solved by replacing line 5 of the data.py script from torchvision.transforms import InterpolationMode with the following: from transforms import InterpolationMode Pull request no. 29 (not yet merged) contains this fix.