2023-06-17 11:41:10.806 Uncaught app exception | 0/222333 [00:00<?, ?frames/s]
Traceback (most recent call last):
File "/home/ben/.local/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _runscript
exec(code, module.dict)
File "/home/ben/whisper-ui/app/01🏠_Home.py", line 77, in
media_manager.add(
File "app/core.py", line 181, in add
self._create(source_list=source_list, source_type=source_type, whisper_args)
File "app/core.py", line 163, in _create
self._transcribe_and_save(media_obj, whisper_model, whisper_args)
File "app/core.py", line 74, in _transcribe_and_save
transcript = self._transcribe(media_obj.filepath, whisper_model, whisper_args)
File "app/core.py", line 64, in _transcribe
transcript = transcriber.transcribe(
File "/home/ben/.local/lib/python3.9/site-packages/whisper/transcribe.py", line 181, in transcribe
result: DecodingResult = decode_with_fallback(segment)
File "/home/ben/.local/lib/python3.9/site-packages/whisper/transcribe.py", line 117, in decode_with_fallback
decode_result = model.decode(segment, options)
File "/home/ben/.local/lib/python3.9/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, *kwargs)
File "/home/ben/.local/lib/python3.9/site-packages/whisper/decoding.py", line 705, in decode
result = DecodingTask(model, options).run(mel)
File "/home/ben/.local/lib/python3.9/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(args, kwargs)
File "/home/ben/.local/lib/python3.9/site-packages/whisper/decoding.py", line 637, in run
tokens, sum_logprobs, no_speech_probs = self._main_loop(audio_features, tokens)
File "/home/ben/.local/lib/python3.9/site-packages/whisper/decoding.py", line 592, in _main_loop
logits = self.inference.logits(tokens, audio_features)
File "/home/ben/.local/lib/python3.9/site-packages/whisper/decoding.py", line 145, in logits
return self.model.decoder(tokens, audio_features, kv_cache=self.kv_cache)
File "/home/ben/.local/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, kwargs)
File "/home/ben/.local/lib/python3.9/site-packages/whisper/model.py", line 190, in forward
x = block(x, xa, mask=self.mask, kv_cache=kv_cache)
File "/home/ben/.local/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, *kwargs)
File "/home/ben/.local/lib/python3.9/site-packages/whisper/model.py", line 125, in forward
x = x + self.attn(self.attn_ln(x), mask=mask, kv_cache=kv_cache)[0]
File "/home/ben/.local/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(args, kwargs)
File "/home/ben/.local/lib/python3.9/site-packages/whisper/model.py", line 85, in forward
wv, qk = self.qkv_attention(q, k, v, mask)
File "/home/ben/.local/lib/python3.9/site-packages/whisper/model.py", line 97, in qkv_attention
qk = qk + mask[:n_ctx, :n_ctx]
RuntimeError: The size of tensor a (261) must match the size of tensor b (3) at non-singleton dimension 3
hello i get this error with large model
nvidia rtx3080ti 32Gb ram ryzen 7 5800X3D debian 11 with wsl2
2023-06-17 11:41:10.806 Uncaught app exception | 0/222333 [00:00<?, ?frames/s] Traceback (most recent call last): File "/home/ben/.local/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _runscript exec(code, module.dict) File "/home/ben/whisper-ui/app/01🏠_Home.py", line 77, in
media_manager.add(
File "app/core.py", line 181, in add
self._create(source_list=source_list, source_type=source_type, whisper_args)
File "app/core.py", line 163, in _create
self._transcribe_and_save(media_obj, whisper_model, whisper_args)
File "app/core.py", line 74, in _transcribe_and_save
transcript = self._transcribe(media_obj.filepath, whisper_model, whisper_args)
File "app/core.py", line 64, in _transcribe
transcript = transcriber.transcribe(
File "/home/ben/.local/lib/python3.9/site-packages/whisper/transcribe.py", line 181, in transcribe
result: DecodingResult = decode_with_fallback(segment)
File "/home/ben/.local/lib/python3.9/site-packages/whisper/transcribe.py", line 117, in decode_with_fallback
decode_result = model.decode(segment, options)
File "/home/ben/.local/lib/python3.9/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, *kwargs)
File "/home/ben/.local/lib/python3.9/site-packages/whisper/decoding.py", line 705, in decode
result = DecodingTask(model, options).run(mel)
File "/home/ben/.local/lib/python3.9/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(args, kwargs)
File "/home/ben/.local/lib/python3.9/site-packages/whisper/decoding.py", line 637, in run
tokens, sum_logprobs, no_speech_probs = self._main_loop(audio_features, tokens)
File "/home/ben/.local/lib/python3.9/site-packages/whisper/decoding.py", line 592, in _main_loop
logits = self.inference.logits(tokens, audio_features)
File "/home/ben/.local/lib/python3.9/site-packages/whisper/decoding.py", line 145, in logits
return self.model.decoder(tokens, audio_features, kv_cache=self.kv_cache)
File "/home/ben/.local/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, kwargs)
File "/home/ben/.local/lib/python3.9/site-packages/whisper/model.py", line 190, in forward
x = block(x, xa, mask=self.mask, kv_cache=kv_cache)
File "/home/ben/.local/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, *kwargs)
File "/home/ben/.local/lib/python3.9/site-packages/whisper/model.py", line 125, in forward
x = x + self.attn(self.attn_ln(x), mask=mask, kv_cache=kv_cache)[0]
File "/home/ben/.local/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(args, kwargs)
File "/home/ben/.local/lib/python3.9/site-packages/whisper/model.py", line 85, in forward
wv, qk = self.qkv_attention(q, k, v, mask)
File "/home/ben/.local/lib/python3.9/site-packages/whisper/model.py", line 97, in qkv_attention
qk = qk + mask[:n_ctx, :n_ctx]
RuntimeError: The size of tensor a (261) must match the size of tensor b (3) at non-singleton dimension 3