You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that compatibility issues persist between whisper_timestamped v1.15.5 and openai-whisper v20240930 (TypeError: 'NoneType' object is not subscriptable)
#221
Closed
JHjang223 opened this issue
Nov 3, 2024
· 0 comments
I'm trying to use whisper-timestamped v1.15.5 along with the latest version of openai-whisper v20240930. However, after installing both versions, I encountered the following error when running the code( Additionally, i am using Python 3.9.20 and pytorch 2.1.2+cu121:
Traceback (most recent call last):
File "/data1/whisper_test/inference.py", line 11, in test_whisper_inf
segments = whisper.transcribe(model, file_path, language="ko", beam_size=5, best_of=5, temperature=(0.0, 0.2, 0.4, 0.6, 0.8, 1.0), vad=True, detect_disfluencies=True)
File "/data1/whisper_test/whisper_timestamped/transcribe.py", line 304, in transcribe_timestamped
(transcription, words) = _transcribe_timestamped_naive(model, audio,
File "/data1/whisper_test/whisper_timestamped/transcribe.py", line 1246, in _transcribe_timestamped_naive
attention_weights = [w[:, :, i_start-1:, :] for w in attention_weights]
File "/data1/whisper_test/whisper_timestamped/transcribe.py", line 1246, in <listcomp>
attention_weights = [w[:, :, i_start-1:, :] for w in attention_weights]
TypeError: 'NoneType' object is not subscriptable
Based on my investigation, it appears that this error is caused by the selective addition of a function in openai-whisper v20240930 that does not return attention weights (qk). Specifically, the scaled_dot_product_attention in torch.nn.functional was applied in the v20240930 update, and since this function does not return attention weights (qk), it seems to be causing compatibility issues with whisper-timestamped.
Although I confirmed #212, I've noticed that the disabled_sdpa() function in the latest whisper-timestamped v1.15.5 does not seem to resolve this issue effectively. Anyway, The code works perfectly with openai-whisper v20240927, where qk values are still always returned.
The text was updated successfully, but these errors were encountered:
JHjang223
changed the title
It appears that compatibility issues persist between whisper_timestamped v1.15.5 and openai-whisper v20240930. (TypeError: 'NoneType' object is not subscriptable)
It appears that compatibility issues persist between whisper_timestamped v1.15.5 and openai-whisper v20240930 (TypeError: 'NoneType' object is not subscriptable)
Nov 3, 2024
I'm trying to use whisper-timestamped
v1.15.5
along with the latest version of openai-whisperv20240930
. However, after installing both versions, I encountered the following error when running the code( Additionally, i am using Python3.9.20
and pytorch2.1.2+cu121
:Based on my investigation, it appears that this error is caused by the selective addition of a function in openai-whisper
v20240930
that does not return attention weights (qk). Specifically, thescaled_dot_product_attention
intorch.nn.functional
was applied in thev20240930
update, and since this function does not return attention weights (qk), it seems to be causing compatibility issues with whisper-timestamped.Although I confirmed #212, I've noticed that the
disabled_sdpa()
function in the latest whisper-timestampedv1.15.5
does not seem to resolve this issue effectively. Anyway, The code works perfectly with openai-whisperv20240927
, where qk values are still always returned.The text was updated successfully, but these errors were encountered: