"Better to use explicit classes if local code works" not working

#17
by xugy07 - opened

Better to use explicit classes if local code works

image_processor_class = "Kosmos2ImageProcessor"
tokenizer_class = "Kosmos2TokenizerFast"

To make remote code work

image_processor_class = "AutoImageProcessor"

tokenizer_class = "AutoTokenizer"

When changing image_processor_class = "Kosmos2ImageProcessor", it reports:
module transformers has no attribute Kosmos2ImageProcessor

It is reasonable, because Kosmos2ImageProcessor is not in standard Hugginface now.

Then how can I modify the code to use the local processing_kosmos2.py instead of the hub downloaded file.

Thank you

Probably better to wait the official port to be merged

https://github.com/huggingface/transformers/pull/24709

ydshieh changed discussion status to closed

Sign up or log in to comment