clovaai / donut

Official Implementation of OCR-free Document Understanding Transformer (Donut) and Synthetic Document Generator (SynthDoG), ECCV 2022
https://arxiv.org/abs/2111.15664
MIT License
5.53k stars 444 forks source link

Error in running sample colab - "Something went wrong Unexpected end of JSON input" #211

Open arifoyong opened 1 year ago

arifoyong commented 1 year ago

Hi, I tried to follow the demo colab as mentioned in readme.

Initially this code generates error: pretrained_model = DonutModel.from_pretrained(args.pretrained_path) The error was: Error(s) in loading state_dict for DonutModel: size mismatch for encoder.model.layers.1.downsample.norm.weight . . . .

I followed the recommendation to include ignore_mismatched_sizes=True in the model from_pretrained method. It solves the error and I was able to launch demo.launch()

However, after uploading an image of receipt and submitting it, it prompts error "Something went wrong Unexpected end of JSON input". Does anybody have the same issue?

Duojun-Huang commented 1 year ago

I have the same problem as you. Any solution now? Thanks.

dyf102 commented 1 year ago

I have the same problem as you

sxn2012 commented 1 year ago

same here

chopin1998 commented 1 year ago

same...

miomiora commented 1 year ago

same

ken6078 commented 1 year ago

I fix this error with #192 Just need to change the package version wish can help you

miomiora commented 1 year ago

I fix this error with #192 Just need to change the package version wish can help you

thanks bro

gwkrsrch commented 1 year ago

Thank you all (@arifoyong , @starchaser49 , @dyf102 , @sxn2012 , @chopin1998 , @miomiora ) for bringing this issue to our attention, and a special thanks to @ken6078 for the comment.

We have received reports about challenges in configuring the testing environment for donut-python due to recent updates in key dependency libraries. We want to assure you that we are working on finding a solution.

In the meantime, we have updated the Google Colab demo (as of June 15, 2023) to ensure its proper functionality. You can access the demo links below for assistance:

We hope these resources will help you. If you have any questions or encounter any difficulties, please let us know. We will resolve the issue and hope to ensure a smooth experience for all.