Explorar el Código

Simplify a function

oobabooga hace 2 años
padre
commit
0b458bf82d
Se han modificado 1 ficheros con 1 adiciones y 2 borrados
  1. 1 2
      modules/models.py

+ 1 - 2
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)