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

insanely_fast_whisper_colab.ipynb doesn't work #134

Closed
danielKlasss opened this issue Dec 13, 2023 · 3 comments
Closed

insanely_fast_whisper_colab.ipynb doesn't work #134

danielKlasss opened this issue Dec 13, 2023 · 3 comments

Comments

@danielKlasss
Copy link

Hi,

I find your project very interesting, therefore I tried to run the demo notebook in a T4 runtime on colab.
But the execution of the cell !pipx run insanely-fast-whisper --file-name https://huggingface.co/datasets/reach-vb/random-audios/resolve/main/ted_60.wav fails for me:

/root/.cache/pipx/fbbfdc728a6642e/lib/python3.10/site-packages/pyannote/audio/core/io.py:43: UserWarning: torchaudio._backend.set_audio_backend has been deprecated. With dispatcher enabled, this function is no-op. You can remove the function call.
  torchaudio.set_audio_backend("soundfile")
/root/.cache/pipx/fbbfdc728a6642e/lib/python3.10/site-packages/torch_audiomentations/utils/io.py:27: UserWarning: torchaudio._backend.set_audio_backend has been deprecated. With dispatcher enabled, this function is no-op. You can remove the function call.
  torchaudio.set_audio_backend("soundfile")
config.json: 100% 1.27k/1.27k [00:00<00:00, 5.89MB/s]
model.safetensors: 100% 3.09G/3.09G [00:25<00:00, 119MB/s]
generation_config.json: 100% 3.87k/3.87k [00:00<00:00, 15.4MB/s]
tokenizer_config.json: 100% 283k/283k [00:00<00:00, 12.4MB/s]
vocab.json: 100% 1.04M/1.04M [00:00<00:00, 3.90MB/s]
tokenizer.json: 100% 2.48M/2.48M [00:00<00:00, 30.2MB/s]
merges.txt: 100% 494k/494k [00:00<00:00, 54.1MB/s]
normalizer.json: 100% 52.7k/52.7k [00:00<00:00, 48.9MB/s]
added_tokens.json: 100% 34.6k/34.6k [00:00<00:00, 93.6MB/s]
special_tokens_map.json: 100% 2.07k/2.07k [00:00<00:00, 9.21MB/s]
Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.
preprocessor_config.json: 100% 340/340 [00:00<00:00, 1.75MB/s]
Traceback (most recent call last):
  File "/root/.cache/pipx/fbbfdc728a6642e/bin/insanely-fast-whisper", line 8, in <module>
    sys.exit(main())
  File "/root/.cache/pipx/fbbfdc728a6642e/lib/python3.10/site-packages/insanely_fast_whisper/cli.py", line 105, in main
    pipe.model = pipe.model.to_bettertransformer()
  File "/root/.cache/pipx/fbbfdc728a6642e/lib/python3.10/site-packages/transformers/modeling_utils.py", line 4302, in to_bettertransformer
    return BetterTransformer.transform(self)
  File "/usr/lib/python3.10/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "/root/.cache/pipx/fbbfdc728a6642e/lib/python3.10/site-packages/optimum/bettertransformer/transformation.py", line 228, in transform
    raise NotImplementedError(
NotImplementedError: The model type whisper is not yet supported to be used with BetterTransformer. Feel free to open an issue at https://github.com/huggingface/optimum/issues if you would like this model type to be supported. Currently supported models are: dict_keys(['albert', 'bark', 'bart', 'bert', 'bert-generation', 'blenderbot', 'bloom', 'camembert', 'blip-2', 'clip', 'codegen', 'data2vec-text', 'deit', 'distilbert', 'electra', 'ernie', 'fsmt', 'gpt2', 'gptj', 'gpt_neo', 'gpt_neox', 'hubert', 'layoutlm', 'm2m_100', 'marian', 'markuplm', 'mbart', 'opt', 'pegasus', 'rembert', 'prophetnet', 'roberta', 'roc_bert', 'roformer', 'splinter', 'tapas', 't5', 'vilt', 'vit', 'vit_mae', 'vit_msn', 'wav2vec2', 'xlm-roberta', 'yolos']).

Best wishes

Daniel

@afiaka87
Copy link

I've reported a similar issue running on an RTX 3060 gaming PC with linux here:

#133

@Vaibhavs10
Copy link
Owner

Hi @danielKlasss & @afiaka87 I just released a patch and this should be fixed now. The issue crept up due to an update in optimum: huggingface/optimum#1590

Make sure to get the most recent version of insanely-fast-whisper:

  1. pipx uninstall insanely-fast-whisper
  2. pipx install insanely-fast-whisper==0.0.13 --force

P.S. On the Colab it should work out of the box since we create a fresh virtualenv everytime it is run :)

@danielKlasss
Copy link
Author

@Vaibhavs10 Thank you, I can confirm that the problem is fixed.

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

3 participants