Check that the model is found before use.

This commit is contained in:
Ashley R. Thomas 2024-10-03 21:04:14 -07:00
parent f913b57397
commit d3b689ceab

View file

@ -158,12 +158,11 @@ def run_download_cmd(args: argparse.Namespace, parser: argparse.ArgumentParser):
info = prompt_guard_download_info()
else:
model = resolve_model(args.model_id)
if model is None:
parser.error(f"Model {args.model_id} not found")
return
info = llama_meta_net_info(model)
if model is None:
parser.error(f"Model {args.model_id} not found")
return
if args.source == "huggingface":
_hf_download(model, args.hf_token, args.ignore_patterns, parser)
else: