-
- Downloads
Add VRAM flush when idle
Implement automatic VRAM clearing after a specified period of idleness. * Add a mechanism to track the last activity time and implement a background thread to monitor idleness and clear VRAM after five minutes of inactivity in `app/faster_whisper/core.py` and `app/openai_whisper/core.py`. * Update the `transcribe` and `language_detection` functions in both core files to reset the last activity time upon invocation. * Add a function to fully release the model from memory using `del`, `torch.cuda.empty_cache()`, and `gc.collect()` in both core files. * Add configuration options for the idleness timeout period and enabled/disabled state in the environment variables in `app/webservice.py`.
Please register or sign in to comment