Skip to content

chore: drop gated Cosmos-Guardrail1 prefetch from cosmos3 worker image#22

Merged
Johan-de-R merged 1 commit into
mainfrom
johan/cosmos3-drop-guardrail-prefetch
Jul 11, 2026
Merged

chore: drop gated Cosmos-Guardrail1 prefetch from cosmos3 worker image#22
Johan-de-R merged 1 commit into
mainfrom
johan/cosmos3-drop-guardrail-prefetch

Conversation

@Johan-de-R

Copy link
Copy Markdown

What

Remove the nvidia/Cosmos-Guardrail1 prefetch (the only gated repo, ~10.8GB) from the Cosmos worker Dockerfile, plus the now-unneeded BuildKit hf_token secret mount / HF_TOKEN export.

Why it's safe

Guardrails are disabled in worker.py (guardrails=False, #21 — merged and live in prod as fw-v4), so Cosmos-Guardrail1 is never loaded at runtime. The weights were baked-but-unused.

The remaining prefetched repos are all public (verified via HF API, gated=False): Qwen/Qwen3-0.6B, Qwen/Qwen3-VL-{2B,8B,32B}-Instruct, Wan-AI/Wan2.1-T2V-14B, Wan-AI/Wan2.2-TI2V-5B. Cosmos-Guardrail1 was the sole gated=auto one. So the build now needs no HF token (closes the long-standing token/gate hassle — no more Pernekhan-token / gate-click dependency).

Effect

  • Build: no token, ~10.8GB less to download.
  • Image: ~11GB smaller → faster registry push/pull and faster pod cold-start / scale-up.
  • Runtime inference: unchanged (guardrail already off; weights were unused).

Scope / validation

  • Current prod (Nano fw-v4) is a thin overlay on fw-v3 and does not use this Dockerfile, so this changes nothing running today — it applies to the next canonical rebuild.
  • ⚠️ Recommend a no-token validation build of this Dockerfile before the next canonical rebuild relies on it (confirm it builds end-to-end without --secret). I validated the token-need removal via repo gated-status, but haven't run a full image build.
  • Re-add the Cosmos-Guardrail1 download + hf_token secret if guardrails are ever turned back on (noted inline in the Dockerfile).

🤖 Generated with Claude Code

Guardrails are disabled in worker.py (guardrails=False, #21), so the
nvidia/Cosmos-Guardrail1 snapshot (the only gated repo, ~10.8GB) is never
loaded at runtime. Remove its prefetch, plus the now-unneeded BuildKit
hf_token secret mount / HF_TOKEN export — the remaining prefetched repos
(Qwen3 tokenizers, Wan VAEs) are all public (verified gated=False), so the
build needs NO HF token.

Effect: no token/gate hassle at build time, ~11GB smaller image, faster
registry push/pull and pod cold-start. Runtime inference is unchanged (the
weights were already unused post-#21). Re-add the download + secret if
guardrails are ever turned back on.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Johan-de-R Johan-de-R changed the title cosmos3: drop gated Cosmos-Guardrail1 prefetch from worker image chore: drop gated Cosmos-Guardrail1 prefetch from cosmos3 worker image Jul 11, 2026
@github-actions github-actions Bot added the chore label Jul 11, 2026
@Johan-de-R
Johan-de-R merged commit 9814ff1 into main Jul 11, 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