Suzie1 / ComfyUI_Comfyroll_CustomNodes

Custom nodes for SDXL and SD1.5 including Multi-ControlNet, LoRA, Aspect Ratio, Process Switches, and many more nodes.
https://civitai.com/models/183551/comfyui-comfyroll-custom-nodes
525 stars 68 forks source link

CR Overlay Transparent Image fails with "module 'PIL.Image' has no attribute 'ANTIALIAS'" when using PIL 10.2, Antialias attribute needs renaming #103

Closed aegis72 closed 6 months ago

aegis72 commented 6 months ago

It seems that this attribute has been removed in Pillow 10.x; I downgraded back to 9.5 and it works again.

Error occurred when executing CR Overlay Transparent Image: fyroll_CustomNodes\nodes\nodes_graphics_layout.py", line 522, in overlay_image overlay_image = overlay_image.resize(new_size, Image.ANTIALIAS) module 'PIL.Image' has no attribute 'ANTIALIAS'

BG Info I found: "ANTIALIAS was removed in Pillow 10.0.0 (after being deprecated through many previous versions). Now you need to use PIL.Image.LANCZOS or PIL.Image.Resampling.LANCZOS.

(This is the exact same algorithm that ANTIALIAS referred to, you just can no longer access it through the name ANTIALIAS.)

Reference: Pillow 10.0.0 release notes (with table of removed constants)"

Suzie1 commented 6 months ago

hi, thanks for reporting this its a quick fix, i'll include in the next update Suzie

aegis72 commented 6 months ago

You're amazing, thanks!

Suzie1 commented 6 months ago

fixed in version: 1.71.1 Suzie