Small change to the unload_model() function

This commit is contained in:
oobabooga 2025-04-20 20:00:56 -07:00
parent c178ea02fe
commit 86c3ed3218

View file

@ -131,6 +131,9 @@ def TensorRT_LLM_loader(model_name):
def unload_model(keep_model_name=False):
if shared.model is None:
return
is_llamacpp = (shared.model.__class__.__name__ == 'LlamaServer')
shared.model = shared.tokenizer = None