Reset the model_name after unloading the model (#5051)

This commit is contained in:
Yiximail 2023-12-23 09:18:24 +08:00 committed by GitHub
parent c1b99f45cb
commit afc91edcb2
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 4AEE18F83AFDEB23

View file

@ -482,6 +482,7 @@ def clear_torch_cache():
def unload_model():
shared.model = shared.tokenizer = None
shared.model_name = 'None'
shared.lora_names = []
shared.model_dirty_from_training = False
clear_torch_cache()