mirror of
https://github.com/Dasemu/Transcriptarr.git
synced 2026-11-27 15:36:08 +00:00
Fix garbage collection
Do garbage collection after every task.
This commit is contained in:
1 parent
ddd786f457
commit
1fe9fa59f6
1 file changed
+1
-1
@@ -504,11 +504,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 \
|
||||
|
||||
Reference in new issue
Block a user