-
Notifications
You must be signed in to change notification settings - Fork 1k
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
failed assertion `Placeholder shape mismatches (expected 1 vs got tensorData with 896) at dimIdx = 0' when recognizing text #216
Comments
This is an MPS bug, should be fixed with the newest version of surya, make sure you do pip install -U |
@VikParuchuri OK, thank you very much! |
Hello I'm getting this error but pip install -U does nothing unfortuantely for me. Kind Regards Matt |
Unfortunately I am still seeing this issue with a fresh install in a new virtual environment. Same error with Metal as above:
|
I'm having the same issue for my input. Bounding boxes seem to be fine from visual inspection. |
Is there a way to force execution on the CPU instead of the MPS device? |
This was an issue with pytorch 2.6 - should be fixed with surya-ocr 0.10.2 |
The detial as follow:
OS: Max os, chip: M1
ErrorLog:
Loaded detection model vikp/surya_det3 on device mps with dtype torch.float16
Loaded recognition model vikp/surya_rec2 on device mps with dtype torch.float16
Detecting bboxes: 100%|██████████| 1/1 [00:00<00:00, 1.55it/s]
Recognizing Text: 0%| | 0/1 [00:00<?, ?it/s]/AppleInternal/Library/BuildRoots/d9889869-120b-11ee-b796-7a03568b17ac/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/MPSGraph.mm:678: failed assertion `Placeholder shape mismatches (expected 1 vs got tensorData with 896) at dimIdx = 0'
/Users/theoyu/miniforge3/envs/py310/lib/python3.10/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '
Thank you!
The text was updated successfully, but these errors were encountered: