Skip to content

chore: pin baked hf CLI to 1.16.4 to match framework (no PyPI fetch at boot)#23

Merged
Johan-de-R merged 1 commit into
mainfrom
johan/cosmos3-hf-tool-and-offline
Jul 14, 2026
Merged

chore: pin baked hf CLI to 1.16.4 to match framework (no PyPI fetch at boot)#23
Johan-de-R merged 1 commit into
mainfrom
johan/cosmos3-hf-tool-and-offline

Conversation

@Johan-de-R

Copy link
Copy Markdown

What

Bump the baked/prefetch hf CLI from 1.13.01.16.4 throughout the Cosmos worker Dockerfile.

Why

The framework (cosmos_framework/utils/checkpoint_db.py) invokes uvx hf@1.16.4 download … at model-init to resolve its auxiliary weights. The image baked hf@1.13.0 (uv tool install) and prefetched with it too. Two consequences at every pod boot:

  1. uvx hf@1.16.4 doesn't find a baked 1.16.4 tool → fetches it from PyPI (a runtime network dependency).
  2. The 1.13.0-layout prefetch cache isn't recognized by the 1.16.4 runtime → the weights re-download from HF anyway.

Confirmed on live prod pods (Nano + the Super test): both do uvx hf@1.16.4 download Qwen3-VL-… / Wan2.2 VAE / sound_tokenizer unauthenticated from public HF at boot.

Scope

This is the tool half. The weights half — serving the auxiliary encoder/VAE/sound-tokenizer from deep-storage via a mounted HF cache + HF_HUB_OFFLINE=1 — is a per-deployment change (Super first, then Nano), not baked into this shared image, so it doesn't bloat the image or change Nano's behavior until Nano is migrated.

Effect

Baked tool is reused (no PyPI at boot). Safe for both models (framework calls 1.16.4 regardless). Needed for the fully-offline boot we're building toward.

🤖 Generated with Claude Code

… at boot)

The framework's checkpoint_db shells out to `uvx hf@1.16.4 download ...` at
model-init time, but the image baked/prefetched with hf@1.13.0. That version
mismatch means uvx fetches hf 1.16.4 from PyPI on every pod boot (a runtime
network dependency), and the prefetched HF cache (1.13.0 layout) isn't hit by
the 1.16.4 runtime -> weights re-download from HF too. Align all hf invocations
to 1.16.4 so the baked tool is reused and cache layout matches runtime.

This is the tool half of removing the per-boot network dependency; the weights
half (auxiliary encoder/VAE/sound-tokenizer served from deep-storage via a
mounted HF cache + HF_HUB_OFFLINE=1) is a per-deployment change, not baked here.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Johan-de-R Johan-de-R changed the title cosmos3: pin baked hf CLI to 1.16.4 to match framework (no PyPI fetch at boot) chore: pin baked hf CLI to 1.16.4 to match framework (no PyPI fetch at boot) Jul 14, 2026
@github-actions github-actions Bot added the chore label Jul 14, 2026
@Johan-de-R Johan-de-R merged commit f88aecc into main Jul 14, 2026
14 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant