From 5ac4e4da8b6c4e6ad046248ae24c6633c0987a54 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Sat, 8 Jul 2023 10:22:54 -0700 Subject: [PATCH] Make --model work with argument like models/folder_name --- modules/models.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/models.py b/modules/models.py index 26a4880d..cd01899e 100644 --- a/modules/models.py +++ b/modules/models.py @@ -61,6 +61,10 @@ def load_model(model_name, loader=None): 'ExLlama_HF': ExLlama_HF_loader } + p = Path(model_name) + if p.exists(): + model_name = p.parts[-1] + if loader is None: if shared.args.loader is not None: loader = shared.args.loader