shadowcz007 / comfyui-mixlab-nodes

Workflow-to-APP、ScreenShare&FloatingVideo、GPT & 3D、SpeechRecognition&TTS
https://mixlabnodes.com
MIT License
1.29k stars 81 forks source link

AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'.....PIL.Image 模块中没有 ANTIALIAS 属性,这个问题是因为在较新的 Pillow 版本中,ANTIALIAS 已经被弃用 #339

Open jasoncow007 opened 1 month ago

jasoncow007 commented 1 month ago

Prompt executed in 68.93 seconds got prompt Settings -> Mode=base, Device=cuda:0, Torchscript=disabled Prompt executed in 56.34 seconds got prompt Settings -> Mode=base, Device=cuda:0, Torchscript=disabled Prompt executed in 50.31 seconds got prompt Settings -> Mode=base, Device=cuda:0, Torchscript=disabled !!! Exception during processing !!! module 'PIL.Image' has no attribute 'ANTIALIAS' Traceback (most recent call last): File "D:\ComfyUI-aki-v1.2\execution.py", line 323, in execute output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb) File "D:\ComfyUI-aki-v1.2\execution.py", line 198, in get_output_data return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb) File "D:\ComfyUI-aki-v1.2\execution.py", line 169, in _map_node_over_list process_inputs(input_dict, i) File "D:\ComfyUI-aki-v1.2\execution.py", line 158, in process_inputs results.append(getattr(obj, func)(**inputs)) File "D:\ComfyUI-aki-v1.2\custom_nodes\comfyui-mixlab-nodes\nodes\ImageNode.py", line 2002, in run res = composite_images(fg_pil, bg_pil, mask_pil, is_multiply_blend, position, scale) File "D:\ComfyUI-aki-v1.2\custom_nodes\comfyui-mixlab-nodes\nodes\ImageNode.py", line 126, in composite_images layer_image = layer['image'].resize((layer['width'], layer['height']), Image.ANTIALIAS) AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'

jasoncow007 commented 1 month ago

image 这个节点

sunkinux commented 3 weeks ago

same problem

使用 Resampling.LANCZOS 替换 Image.ANTIALIAS

Change the code manually ComfyUI/custom_nodes/comfyui-mixlab-nodes/nodes/ImageNode.py

image

image

problem solved