Skip to main content

Module hf_cache

Module hf_cache 

Source
Expand description

Where Hugging Face weights land locally, and whether they are already there.

Both SigLIP (videre embed) and InsightFace (videre faces) resolve their weights through hf-hub into this cache. Note it is not ~/.cache/ort/, which CLAUDE.md claimed for months and which has never existed; a check written against that path reports “cold” forever.

This lives in videre-core rather than in a test helper because three callers need it: the integration-test harness, videre-ml’s own tests, and anything that wants to avoid triggering a multi-hundred-megabyte download as a side effect. hf-hub 1.0.0 exposes no offline switch, so the check has to be ours.

Functions§

cache_dir
Root of the local Hugging Face hub cache, honouring HF_HOME.
repo_has
Whether every one of files is present in some snapshot of repo.
siglip_ready
Whether a SigLIP model has enough cached to run inference.