From 7cf7d571b7190fea536f39f0cf052a48f82a3de9 Mon Sep 17 00:00:00 2001 From: McCloudS <64094529+McCloudS@users.noreply.github.com> Date: Thu, 23 Jan 2025 08:34:59 -0700 Subject: [PATCH] Potential fix for garbage collector --- subgen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subgen.py b/subgen.py index d74e371..5cf67c6 100644 --- a/subgen.py +++ b/subgen.py @@ -639,11 +639,11 @@ def start_model(): model = stable_whisper.load_faster_whisper(whisper_model, download_root=model_location, device=transcribe_device, cpu_threads=whisper_threads, num_workers=concurrent_transcriptions, compute_type=compute_type) def delete_model(): - gc.collect() if clear_vram_on_complete and task_queue.qsize() == 0: global model logging.debug("Queue is empty, clearing/releasing VRAM") model = None + gc.collect() def isAudioFileExtension(file_extension): return file_extension.casefold() in \