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

Memory issues #89

Closed
DaniruKun opened this issue Feb 17, 2023 · 2 comments
Closed

Memory issues #89

DaniruKun opened this issue Feb 17, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@DaniruKun
Copy link

DaniruKun commented Feb 17, 2023

The way that the CLI is implemented currently, it is unusable on a medium-size model and e.g. an hour or two long audio file.
The main problem is that after the transcription, the Whisper model is not properly GCed, and the cache isn't cleared, so there is just not enough memory for both the Whisper and the alignment model.
This is a huge issue since many people have consumer RTX 3000-series cards with only 6GB VRAM.

A quick solution is to not load all models at the same time, and properly GC the whisper model before doing the next steps:

del whisper_model
gc.collect()
torch.cuda.empty_cache()
@DaniruKun DaniruKun changed the title Enhancement: include examples of programmatic customisation? Memory issues Feb 18, 2023
@m-bain m-bain added the enhancement New feature or request label Apr 4, 2023
@m-bain
Copy link
Owner

m-bain commented Apr 4, 2023

i'll make model flushing an option soon, for cheaper gpu reqs. as well as using faster-whisper (but no ETA yet) as a drop-in replacement for whisper

@m-bain
Copy link
Owner

m-bain commented May 1, 2023

faster-whisper backend, and model flushing now in v3 version
should reduce gpu mem reqs a lot.
See #159 (comment) for other ways to reduce gpu mem

@m-bain m-bain closed this as completed May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants