cubiq/ComfyUI_InstantID

Error when running Apply InstantID

bagaabu opened this issue · 1 comments

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 ???

Have you solved it?