Skip to main content
Registry • 2 mins read

Pulling models & images

Pulling models & images

Public repos pull anonymously. Private repos need a login — see Push for the one-shot provisioning step that also writes the credentials hippius-hub uses on pull.


Pull a single file

from hippius_hub import hf_hub_download

path = hf_hub_download(
repo_id="my-models/qwen-7b",
filename="config.json",
revision="v1",
)
print(path) # ~/.cache/hippius/hub/models--my-models--qwen-7b/snapshots/v1/config.json

Drop-in for hf_hub_download — the cache layout matches huggingface_hub exactly, so transformers / diffusers reading from the same directory Just Works.


Pull a whole repo

from hippius_hub import snapshot_download

local_dir = snapshot_download(
repo_id="my-models/qwen-7b",
revision="v1",
allow_patterns=["*.safetensors", "*.json"],
ignore_patterns="optimizer*",
max_workers=8,
)

Drop-in for snapshot_download. For whole-repo pulls this is the recommended path — it parallelizes across files and lays bytes out in the HF cache shape that transformers.from_pretrained(...) reads from.


Tag vs digest

Tags (:v1, :main) are mutable — re-pushing to the same revision moves the tag onto a new manifest. Digests (@sha256:…) are immutable — the same bytes forever.

  • Pin to a digest for CI/CD, Kubernetes manifests, and anywhere reproducibility matters.
  • Use a tag for interactive development and the "give me the latest" case.

hippius-hub models show <repo> prints every tag and digest indexed for a repo.


Tuning parallel downloads

The Rust downloader ships in the wheel — no compile step needed. Two knobs are worth knowing:

Env varDefaultWhat it does
HIPPIUS_CHUNK_SIZE104857600 (100 MiB)Per-chunk size for the parallel Rust downloader. Smaller = more parallel requests, larger = fewer/bigger requests.
HIPPIUS_VERIFY_HASHunset (off)Set to 1/true to SHA256-verify every download against the registry's recorded digest.

For snapshot_download, max_workers=8 (the default) parallelizes across files. Bump it higher on fat connections.


Where to next

  • Push — upload your own models or container images.
  • CLI reference — every hippius-hub command, grouped by goal.