Skip to content
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

IndexError: index 224 is out of bounds for dimension 1 with size 3 #11

Open
JunZhan2000 opened this issue Feb 27, 2023 · 3 comments
Open

Comments

@JunZhan2000
Copy link

Hi, Thanks for your work!
I missed a problem when i use 8 as batch size, this is the error imformation:

Traceback (most recent call last):
File "/remote-home/share/jzhan/jzhan/WhisperASR2.py", line 85, in
res_list = model.transcribe(audio_data_list, language="zh")
File "/remote-home/share/jzhan/jzhan/batch_whisper/transcribe.py", line 75, in transcribe
return batch_transcribe(model=model,
File "/remote-home/share/jzhan/jzhan/batch_whisper/transcribe.py", line 477, in batch_transcribe
results: List[DecodingResult] = decode_with_fallback(torch.stack(batch_segments))
File "/remote-home/share/jzhan/jzhan/batch_whisper/transcribe.py", line 385, in decode_with_fallback
decode_result = model.decode(segment, options)
File "/remote-home/jzhan/miniconda3/envs/whisper/lib/python3.9/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/remote-home/share/jzhan/jzhan/batch_whisper/decoding.py", line 860, in decode
result = DecodingTask(model, options).run(mel)
File "/remote-home/jzhan/miniconda3/envs/whisper/lib/python3.9/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/remote-home/share/jzhan/jzhan/batch_whisper/decoding.py", line 772, in run
tokens, sum_logprobs, no_speech_probs = self._main_loop(audio_features, tokens)
File "/remote-home/share/jzhan/jzhan/batch_whisper/decoding.py", line 692, in _main_loop
probs_at_sot.append(logits[:, self.sot_index[i]].float().softmax(dim=-1))
IndexError: index 224 is out of bounds for dimension 1 with size 3

@RGuven
Copy link

RGuven commented Mar 27, 2023

any solution?

@jake1271
Copy link

jake1271 commented Apr 9, 2023

I'm getting the same exact issue, seems to happen with longer files but can't pin it down.
Sometimes I can do 18 files but other times I get this error "IndexError: index 224 is out of bounds for dimension 1 with size 3" when only doing 6 files.
Working on Windows 10 with RTX 3060 12GB vram.

I'm continuing to test to see what the threshold is where it breaks. I'll post updates.
This is an awesome fork, probably the most useful I've seen so far, not sure why it's not getting more attention!

@ytl-liva
Copy link

i get this too, tried it on batch 10, 15, 5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants