Describe the bug
check load_image method here, https://huggingface.co/transformers/v4.11.3/_modules/transformers/pipelines/image_classification.html ,
and check this image at path "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\diffusers\utils\loading_utils.py"

compare

Reproduction
def imgloader(im, sz=512):
im = Image.open(im)
width, height = im.size
# im = im.resize((sz, sz * height // width))
print(im)
# convert to Image instance
# im = Image.open(im)
return im
print(isinstance(imgloader("base2.png"), Image.Image))
load_image(imgloader("base2.png"))
throws error
Logs
No response
System Info
source code issue i believe, platform independent
Who can help?
No response