From 7f8a8a142fa1383a7895ed01dd7082105f9a81fb Mon Sep 17 00:00:00 2001 From: Kasra Ghodsi Date: Fri, 12 Jun 2026 21:53:41 -0700 Subject: [PATCH] Image.ANTIALIAS -> Image.Resampling.LANCZOS Summary: Pillow 10 removed `Image.ANTIALIAS` (the built 10.4.0 wheel raises `AttributeError`). Replace it with `Image.Resampling.LANCZOS`, the documented successor, which is dual-compat across Pillow 9.4.0 / 10.4.0 / 11.3.0 / 12.2.0. This lands cleanly under the current 9.4.0 pin ahead of the fleet pin bump. Pure constant rename, no behavior change. PyTorch3D is Meta-authored OSS (fbcode is the source of truth); this change is exported to github.com/facebookresearch/pytorch3d, where the `ANTIALIAS` -> `Resampling.LANCZOS` modernization is equally valid. Part of the Pillow 9.x -> 10.x migration; see `third-party/pypi/pillow/.agents/migrate-9-to-10.md`. ___ Differential Revision: D108493452 fbshipit-source-id: bb1588e9b2057c6cc27a3d6c382faa4b2ac65f7f --- pytorch3d/implicitron/tools/video_writer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytorch3d/implicitron/tools/video_writer.py b/pytorch3d/implicitron/tools/video_writer.py index c0abd0cc..e25330c2 100644 --- a/pytorch3d/implicitron/tools/video_writer.py +++ b/pytorch3d/implicitron/tools/video_writer.py @@ -130,7 +130,7 @@ class VideoWriter: # make sure size is divisible by 2 resize = tuple([resize[i] + resize[i] % 2 for i in (0, 1)]) - im = im.resize(resize, Image.ANTIALIAS) + im = im.resize(resize, Image.Resampling.LANCZOS) im.save(outfile) self.frames.append(outfile)