lucataco commited on
Commit
953e003
·
verified ·
1 Parent(s): 0ebb1d0

clef_mlx.py: default --model works inside Hub cache snapshots (symlinked files)

Browse files
Files changed (1) hide show
  1. clef_mlx.py +2 -1
clef_mlx.py CHANGED
@@ -585,7 +585,8 @@ def load(path: str | Path, head_dtype=mx.bfloat16, backend: str = "auto") -> Cle
585
 
586
  def _default_model() -> str | None:
587
  """When run from inside a downloaded repo, default to that repo."""
588
- here = Path(__file__).resolve().parent
 
589
  return str(here) if (here / "joint_head.safetensors").exists() else None
590
 
591
 
 
585
 
586
  def _default_model() -> str | None:
587
  """When run from inside a downloaded repo, default to that repo."""
588
+ # absolute(), not resolve(): Hub cache snapshots are symlinks into a blob store.
589
+ here = Path(__file__).absolute().parent
590
  return str(here) if (here / "joint_head.safetensors").exists() else None
591
 
592