Image-to-Text
HTRflow
Swedish

ValueError: Unrecognized model in Riksarkivet/satrn_htr.

#2
by fattynoparents - opened

When trying to load this model using transformers:

from transformers import pipeline

pipe = pipeline("image-to-text", model="Riksarkivet/satrn_htr")

I get the error:

ValueError: Unrecognized model in Riksarkivet/satrn_htr. Should have a 'model_type' key in its config.json, or contain one of the following strings in its name: albert, align, altclip, audio-spectrogram-transformer, autoformer, bark, bart, beit, bert, bert-generation, big_bird, bigbird_pegasus, biogpt, bit, blenderbot ....

The model_type key is indeed missing in the config.json file, could you please fix this?

AI Riksarkivet / AIRA org

Hi! The model is from the openmmlab framework and not a part of huggingface (transformers), i.e pipeline class wont work. However, you can use our htrflow libary to run this model: https://github.com/AI-Riksarkivet/htrflow

Thanks will try that!

fattynoparents changed discussion status to closed

I have tried the HTR flow project, and I'm unable to use the SATRN model with it. I have opened an issue on Github, don't know if you seen it, copying it here as well:

When trying to add the Riksarkivet/satrn_htr model to the pipeline config and run htrflow pipeline pipeline 1.jpg I get the following error:

NotImplementedError: Model satrn_htr is not supported. The available models are: DiT, LLavaNext, TrOCR, WordLevelTrOCR, YOLO.

The same happens if I try to use the Riksarkivet/rtmdet_lines model for segmentation.

The yolo and Riksarkivet/trocr-base-handwritten-hist-swe-2 models work fine.

fattynoparents changed discussion status to open

Sign up or log in to comment