The size of tensor a (41) must match the size of tensor b (13) at non-singleton dimension 3 #2172
Unanswered
luoMonkeyKing
asked this question in
Q&A
Replies: 1 comment
-
The whisper API is not thread safe. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Does whisper not support multi-threaded concurrent calls? The global variable I use when loading the model:
whisper.load_model(name="large", download_root='/root').to(device)
, initialize the instance in the thread:torch.hub.load(repo_or_dir='/root/snakers4_silero-vad_master',model='silero_vad',force_reload=False,trust_repo=True,source='local',onnx=False)
But when using multi-trip concurrent call whisper, the following error is reported:
RuntimeError: The size of tensor a (41) must match the size of tensor b (13) at non-singleton dimension 3
If whisper.load_model is loaded in a thread pool, concurrency can be supported, but this is too slow. The model needs to be loaded every time. Is there any better way to support multiple concurrency?
Flask + Python 3.11
Beta Was this translation helpful? Give feedback.
All reactions