Closed arihid closed 9 months ago
So, you don't have internet, or at least don't let the app connect to the internet, or huggingface is currently experiencing an outtage, fair enough, so instead decided to download the models yourself, correct?
Question is, where did you put the model (because for OCR this is a whole directory of like 5 files)? And did you perhaps not unzip it if you downloaded that as a bundle? You can see the correct place to download the model to in the download greeter, the very first thing that opens when you don't have the models installed. (Or to make it appear again, go to the help menu and select to delete the models, or even just delete your config file) Tip: it isn't the "models" folder used by the comictextdetector.
From the log (thank you very much for including that, it's helped a lot) I can see that the model downloader thinks you have OCR installed, but it then fails to load it. I'd be curious to know what it is finding there, since it checks for the directory huggingface/hub/models--kha-white--manga-ocr-base
which will default to C:\Users\<username>\.cache\huggingface\hub\models--kha-white--manga-ocr-base
on Windows (unless you change the location of the .cache directory with the environment variable XDG_CACHE_HOME.
Yes, huggingface does things in it's own special way, can't do too much about that.
So, assuming your folder structure looks like this:
huggingface
└── hub
├── models--kha-white--manga-ocr-base
│ ├── refs
│ │ └── main
│ └── snapshots
│ └── aa6573bd10b0d446cbf622e29c3e084914df9741
│ ├── config.json
│ ├── preprocessor_config.json
│ ├── pytorch_model.bin
│ ├── special_tokens_map.json
│ ├── tokenizer_config.json
│ └── vocab.txt
└── version.txt
with the files in snapshot being downloaded from https://huggingface.co/kha-white/manga-ocr-base/tree/main (with commit hash aa6573bd10b0d446cbf622e29c3e084914df9741).
The version.txt
contains this:
1
And the main
file contains this:
aa6573bd10b0d446cbf622e29c3e084914df9741
With only that, and no internet, I successfully got panel cleaner to load the model. Without the main file, I got the error you did.
So, if you replicate that structure, it'll work for you, I hope. It's probably just the main
file you were missing, which yes, is poorly documented, I just had to figure it out myself.
If this works for you, I'll consider making a bit of documentation for this process.
Thanks, it now run no prob.
Cool and good!
This error is always shows up whenever I run the prebuilt Windows binary. I have downloaded the ocr model and copied it to the cache location.
Here's the log: