Error finding processor's image class. Loading based on pattern matching with feature extractor

I think this has something to do with processor. While saving the model weights you are supposed to save the config related files as well. so don’t forget to do this:

processor = TrOCRProcessor.from_pretrained("microsoft/trocr-base-printed")
model = VisionEncoderDecoderModel.from_pretrained("microsoft/trocr-base-printed")

# do some config changes...
# train or whatever

processor.save_pretrained('test')
model.save_pretrained('test')

and then load it from test. I guess you won’t see this line then.