cubiq / ComfyUI_InstantID

Apache License 2.0
1.21k stars 69 forks source link

Error when running Apply InstantID #184

Open bagaabu opened 3 months ago

bagaabu commented 3 months ago

i am running a test of InstantID, however it turns out the error below, anyone meet this?

!!! Exception during processing!!! pic should be PIL Image or ndarray. Got <class 'list'> Traceback (most recent call last): File "/data/zhanglei/projects/ComfyUI/execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "/data/zhanglei/projects/ComfyUI/execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "/data/zhanglei/projects/ComfyUI/execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "/data/zhanglei/projects/ComfyUI/custom_nodes/ComfyUI_InstantID/InstantID.py", line 290, in apply_instantid face_kps = extractFeatures(insightface, image_kps if image_kps is not None else image[0].unsqueeze(0), extract_kps=True) File "/data/zhanglei/projects/ComfyUI/custom_nodes/ComfyUI_InstantID/InstantID.py", line 187, in extractFeatures out = torch.stack(T.ToTensor()(out), dim=0).permute([0,2,3,1]) File "/home/zhanglei/anaconda3/envs/ComfyUi/lib/python3.10/site-packages/torchvision/transforms/transforms.py", line 134, in call return F.to_tensor(pic) File "/home/zhanglei/anaconda3/envs/ComfyUi/lib/python3.10/site-packages/torchvision/transforms/functional.py", line 138, in to_tensor raise TypeError(f"pic should be PIL Image or ndarray. Got {type(pic)}") TypeError: pic should be PIL Image or ndarray. Got <class 'list'>

guess maybe the version of torchvision is mismatched ???

alpaca-htt commented 3 weeks ago

Have you solved it?

cubiq commented 1 week ago

this is probably due to an old version of some libraries... torch, pil, or something