THtianhao / ComfyUI-Portrait-Maker

Apache License 2.0
175 stars 8 forks source link

Using deprecated attribute ANTIALIAS #20

Closed twitset closed 7 months ago

twitset commented 9 months ago

After following installatino instructions I get this error:

Error occurred when executing PM_MakeUpTransfer:

module 'PIL.Image' has no attribute 'ANTIALIAS'

File "/home/sd1111/ComfyUI/execution.py", line 153, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "/home/sd1111/ComfyUI/execution.py", line 83, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "/home/sd1111/ComfyUI/execution.py", line 76, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "/home/sd1111/ComfyUI/custom_nodes/ComfyUI-Portrait-Maker/portrait/nodes.py", line 374, in makeup_transfer
result = get_pagan_interface().transfer(source_image, makeup_image)
File "/home/sd1111/ComfyUI/custom_nodes/ComfyUI-Portrait-Maker/portrait/utils/psgan_utils.py", line 867, in transfer
source_input, face, crop_face = self.preprocess(source)
File "/home/sd1111/ComfyUI/custom_nodes/ComfyUI-Portrait-Maker/portrait/utils/psgan_utils.py", line 459, in __call__
image = image.resize((self.img_size, self.img_size), Image.Resampling.NEAREST)
THtianhao commented 8 months ago

It seems thatPIL.ImageANTIALIAS has been changed toImage.Resampling.NEAREST. Why do you get such an error?