-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to load TSL model #27
Comments
This seems to be related to
but in both cases i do not think it is clear what the root cause is (the error you see is the server reporting an exception happened in The server does not require any particular permission, just normal R/W which you should have as I imagine the database has already been created the database. A few troubleshooting step i would suggest that might solve or give us more clues
As a reference when downloading
|
Yesh, to create symlink i used powershell. This screenshot from freash start (no symlink), just now. Maybe there is some hint at "could not find image processor class", but i don't really think so... |
Python by itself should not access the CUDA api directly, it is usually done by C/C++ code under the hood. I am not sure what the problem here could be, it might require some digging through the As another possible patchwork solution, could you try also the manual download approach?
Another thing, for running the code could you try doing it from powershell after setting the following environment variables, as the info if the code is being loaded from manually stores files is shown as a debug message
and than either write the path to the EXE, or depending on your terminal you could also drag and drop the file on it and it will autowrite the file path. You could even try playing around with the |
Found source problem. It was cyrillic symbols in user's name. Was changed name to latin (hell of a job i would say), or how is it all calls... Now it works like a charm, like a clock.
Kinda curious, why application manage to access to /user/.ocr_translate with cyrillic symbols in username, but when it is time to load translation model it gave an error? Maybe different load/access methods? But, the problem is gone, at least for me and you are now aware of possibility of it for future. Thank you for your support, great work overall! |
Nice you were able to figure it out. It is already possible to control where model are stored using the I am not 100% sure (should investigate) but i think the problem with the non-latin characters is inside the transformers library, since the problems is with the models and my code was able to create the database. Thanks, hope you will enjoy the tool ;) |
I don't really know what to write it about, just as only I getting this error, i suppose.
Was trying different settings, source languages, models... It keeps downloading to directory, but when it's time to actually load model - it threw an error. What kind of permission this app need?
Windows 10. Symlink'ed .ocr_translate directory
CPU version currently (getting same error in GPU as well)
2024-04-27 17:39:30,023 - INFO - django.server:basehttp - "GET /get_active_options/ HTTP/1.1" 200 64
2024-04-27 17:39:30,049 - INFO - django.server:basehttp - "GET / HTTP/1.1" 200 3776
2024-04-27 17:39:40,772 - INFO - ocr.general:views - SET LANG: {'lang_src': 'ja', 'lang_dst': 'en'}
2024-04-27 17:39:40,775 - INFO - django.server:basehttp - "POST /set_lang/ HTTP/1.1" 200 2
2024-04-27 17:39:40,798 - INFO - django.server:basehttp - "GET /get_active_options/ HTTP/1.1" 200 64
2024-04-27 17:39:40,829 - INFO - django.server:basehttp - "GET / HTTP/1.1" 200 3926
2024-04-27 17:39:51,882 - INFO - django.server:basehttp - "GET /get_active_options/ HTTP/1.1" 200 64
2024-04-27 17:39:51,893 - INFO - django.server:basehttp - "GET / HTTP/1.1" 200 3926
2024-04-27 17:39:54,027 - INFO - ocr.general:views - SET LANG: {'lang_src': 'ja', 'lang_dst': 'en'}
2024-04-27 17:39:54,030 - INFO - django.server:basehttp - "POST /set_lang/ HTTP/1.1" 200 2
2024-04-27 17:39:54,037 - INFO - django.server:basehttp - "GET /get_active_options/ HTTP/1.1" 200 64
2024-04-27 17:39:54,047 - INFO - django.server:basehttp - "GET / HTTP/1.1" 200 3926
2024-04-27 17:39:59,675 - INFO - ocr.general:views - LOAD MODELS: {'box_model_id': 'easyocr', 'ocr_model_id': 'tesseract', 'tsl_model_id': 'facebook/m2m100_1.2B'}
2024-04-27 17:39:59,676 - INFO - ocr.general:box - Loading BOX model: easyocr
2024-04-27 17:40:02,111 - INFO - plugin:plugin - Loading BOX model: easyocr
Using CPU. Note: This module is much faster with a GPU.
2024-04-27 17:40:05,808 - INFO - ocr.general:ocr - Loading OCR model: tesseract
2024-04-27 17:40:05,819 - INFO - ocr.general:tsl - Loading TSL model: facebook/m2m100_1.2B
2024-04-27 17:40:06,495 - INFO - plugin:plugin - Loading TSL model: facebook/m2m100_1.2B
2024-04-27 17:53:03,187 - ERROR - ocr.general:views - Failed to load models: Unable to load vocabulary from file. Please check that the provided vocabulary is accessible and not corrupted.
2024-04-27 17:53:05,137 - INFO - django.server:basehttp - - Broken pipe from ('127.0.0.1', 60097)
Please tell me if I need to provide other information.
P.S. Using latest release from 17.12.2023 (Same error at version from 29.10.2023)
The text was updated successfully, but these errors were encountered: