Hi.
When running Idinvert.ipynb notebook in colab on line target_image = align(inverter, im_name) the error is raised
AttributeError Traceback (most recent call last)
[<ipython-input-3-ac856af3bcc2>](https://localhost:8080/#) in <cell line: 0>()
14 target_name = '000006.png'
15 im_name = os.path.join(pre, target_name)
---> 16 target_image = align(inverter, im_name)
17 print('Target image ready!!!')
18
2 frames
[<ipython-input-2-3730a37eebf4>](https://localhost:8080/#) in align(inverter, image_path)
203 def align(inverter, image_path):
204 """Aligns an unloaded image."""
--> 205 aligned_image = align_face(image_path,
206 align_size=inverter.G.resolution)
207 return aligned_image
[<ipython-input-2-3730a37eebf4>](https://localhost:8080/#) in align_face(image_path, align_size)
180 face_infos = model.detect(image_path)
181 face_infos = face_infos[0]
--> 182 img = model.align(face_infos)
183 return img
184
[<ipython-input-2-3730a37eebf4>](https://localhost:8080/#) in align(self, face_info)
170 img = img.transform((self.align_size * 4, self.align_size * 4), Image.QUAD,
171 (quad + 0.5).flatten(), Image.BILINEAR)
--> 172 img = img.resize((self.align_size, self.align_size), Image.ANTIALIAS)
173
174 return np.array(img)
AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'
Looks like it's due to a breaking change in PIL, see thread, so the code doesn't work with PIL==11.2.1.
To resolve, two options
- fix the version in requirements
pil<10
- use
PIL.Image.LANCZOS instead of PIL.Image.ANTIALIAS

Hi.
When running Idinvert.ipynb notebook in colab on line
target_image = align(inverter, im_name)the error is raisedLooks like it's due to a breaking change in
PIL, see thread, so the code doesn't work withPIL==11.2.1.To resolve, two options
pil<10PIL.Image.LANCZOSinstead ofPIL.Image.ANTIALIAS