Make --model work with argument like models/folder_name

This commit is contained in:
oobabooga 2023-07-08 10:22:54 -07:00
parent acf24ebb49
commit 5ac4e4da8b

View File

@ -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