siddiVinayaka commited on
Commit
cbf5d82
·
verified ·
1 Parent(s): 3700a6f

Fix target check in load_cortex_model

Browse files
Files changed (1) hide show
  1. inference.py +4 -4
inference.py CHANGED
@@ -81,13 +81,13 @@ def load_cortex_model(
81
  calib_candidate = path_obj / "cortex_system_one_calibration.json"
82
  if calib_candidate.is_file():
83
  calibration_path = str(calib_candidate)
84
- elif "/" in model_name_or_path and not path_obj.exists():
85
  # Direct Hugging Face Repo ID passed (e.g. 'siddiVinayaka/Cortex-System-One')
86
  from huggingface_hub import hf_hub_download
87
- print(f"[*] Downloading Cortex-System-One directly from Hugging Face repo '{model_name_or_path}'...")
88
- ckpt_file = Path(hf_hub_download(repo_id=model_name_or_path, filename="ckpt_cortex_system_one_champion.pth"))
89
  if calibration_path:
90
- calibration_path = hf_hub_download(repo_id=model_name_or_path, filename="cortex_system_one_calibration.json")
91
  else:
92
  ckpt_file = path_obj
93
 
 
81
  calib_candidate = path_obj / "cortex_system_one_calibration.json"
82
  if calib_candidate.is_file():
83
  calibration_path = str(calib_candidate)
84
+ elif "/" in target and not path_obj.exists():
85
  # Direct Hugging Face Repo ID passed (e.g. 'siddiVinayaka/Cortex-System-One')
86
  from huggingface_hub import hf_hub_download
87
+ print(f"[*] Downloading Cortex-System-One directly from Hugging Face repo '{target}'...")
88
+ ckpt_file = Path(hf_hub_download(repo_id=target, filename="ckpt_cortex_system_one_champion.pth"))
89
  if calibration_path:
90
+ calibration_path = hf_hub_download(repo_id=target, filename="cortex_system_one_calibration.json")
91
  else:
92
  ckpt_file = path_obj
93