From 0b458bf82dbd7dc6c07a07aa2f54ba7a9f310a02 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Fri, 7 Apr 2023 21:37:41 -0300 Subject: [PATCH] Simplify a function --- modules/models.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/models.py b/modules/models.py index 6fa7dbbd..75dff911 100644 --- a/modules/models.py +++ b/modules/models.py @@ -194,8 +194,7 @@ def unload_model(): def reload_model(): - shared.model = shared.tokenizer = None - clear_torch_cache() + unload_model() shared.model, shared.tokenizer = load_model(shared.model_name)