get_resize_output_image_size() got an unexpected keyword argument 'input_data_format',how can i resolve it ,thank you!

#13
by rainmann - opened

inputs = processor(text=prompt, images=image, return_tensors="pt")
File "C:\Users\zhaojinwei/.cache\huggingface\modules\transformers_modules\kosmos-2-patch14-224\processing_kosmos2.py", line 131, in call
image_encoding = self.image_processor(images, return_tensors=return_tensors)
File "D:\huggingface\Env\lib\site-packages\transformers\image_processing_utils.py", line 458, in call
return self.preprocess(images, **kwargs)
File "C:\Users\zhaojinwei/.cache\huggingface\modules\transformers_modules\kosmos-2-patch14-224\image_processing_kosmos2.py", line 277, in preprocess
images = [
File "C:\Users\zhaojinwei/.cache\huggingface\modules\transformers_modules\kosmos-2-patch14-224\image_processing_kosmos2.py", line 278, in
self.resize(image=image, size=size, resample=resample, input_data_format=input_data_format)
File "C:\Users\zhaojinwei/.cache\huggingface\modules\transformers_modules\kosmos-2-patch14-224\image_processing_kosmos2.py", line 150, in resize
output_size = get_resize_output_image_size(
TypeError: get_resize_output_image_size() got an unexpected keyword argument 'input_data_format'

Hi, please provide a self-complete code snippet. If you are using the one I put in the README.md file, probably you can try to upgrade your transformers version and see if the issue persist.

Close this as there is no code snippet provided.

ydshieh changed discussion status to closed

Hi, please provide a self-complete code snippet. If you are using the one I put in the README.md file, probably you can try to upgrade your transformers version and see if the issue persist.

Upgrade my transformer is solved. Thanks

Sign up or log in to comment