Skip to content

fix(cogvideox): fail loudly when required pipeline files are missing#32

Merged
dgrauet merged 1 commit into
mainfrom
fix/strict-pipeline-config-copy
Jul 20, 2026
Merged

fix(cogvideox): fail loudly when required pipeline files are missing#32
dgrauet merged 1 commit into
mainfrom
fix/strict-pipeline-config-copy

Conversation

@dgrauet

@dgrauet dgrauet commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Problem

The published dgrauet/CogVideoX-Fun-V1.5-5b-InP-mlx-q8 shipped without spiece.model — the T5 tokenizer could not load at all (FileNotFoundError: No spiece.model found), discovered by the VOID dogfood on 2026-07-20 (the hub file was patched manually the same day).

Root cause: the recipe does list tokenizer/spiece.model in _HF_CONFIG_FILES, and the HF-download path is strict (SystemExit on 404) — but the pipeline-config copy loop silently skipped any missing entry (if src.exists()). Converting from a local --source that lacked the file produced an incomplete artifact with no warning.

Fix

Extract the loop into copy_pipeline_configs(source_dir, output_dir): every _HF_CONFIG_FILES entry is required for a usable artifact, so any missing file now aborts the conversion with the full missing list. Flattened a/b → a_b naming unchanged (the VideoX-Fun-mlx tokenizer accepts tokenizer_spiece.model).

Tests

tests/test_cogvideox_config_copy.py: full copy with flattened names; missing tokenizer/spiece.model → SystemExit naming the file. Full suite 250 green.

Follow-up noted in the commit

fish_s2, matrix_game_3_0 and ernie_image* share the same silent if src.exists() copy pattern — left untouched here (their lists mix genuinely optional files); worth a completeness audit.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HNcW12C5eFE9hCL2EnMYmW

The published CogVideoX-Fun-V1.5-5b-InP-mlx-q8 shipped without
spiece.model: the pipeline-config copy loop silently skipped any missing
_HF_CONFIG_FILES entry (`if src.exists()`), so converting from a local
--source that lacked tokenizer/spiece.model produced an artifact whose
tokenizer cannot load at all (discovered by the VOID dogfood — the hub
file was patched manually on 2026-07-20).

Extract the loop into copy_pipeline_configs(): every listed file is
required for a usable artifact, so a missing one now aborts the
conversion naming the full missing list. The HF-download path was
already strict (SystemExit on 404); this closes the local-source hole.

Note: fish_s2, matrix_game_3_0 and ernie_image* share the same silent
`if src.exists()` copy pattern — left untouched here (their lists mix
optional files); worth a follow-up audit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HNcW12C5eFE9hCL2EnMYmW
@dgrauet
dgrauet merged commit e061a6d into main Jul 20, 2026
7 checks passed
@dgrauet
dgrauet deleted the fix/strict-pipeline-config-copy branch July 20, 2026 20:42
dgrauet added a commit that referenced this pull request Jul 20, 2026
…, ernie (#32 audit) (#34)

Audit follow-up of #32: the same silent `if src.exists()` copy pattern
had already shipped a SECOND incomplete artifact —
dgrauet/matrix-game-3.0-mlx lacks google/umt5-xxl/spiece.model even
though upstream Skywork/Matrix-Game-3.0 has it (harmless today only
because the port's AutoTokenizer takes the tokenizer.json fast path).

- convert.copy_required_files(): shared strict copy — aborts naming
  every missing required file; `optional` entries warn instead.
  Supports flattened (a/b -> a_b) and tree-preserving layouts.
- fish_s2, matrix_game_3_0, ernie_image: all listed pipeline files are
  required now.
- ernie_image_pe: tokenizer files required; chat_template.jinja stays
  optional (the ernie-image port deliberately bypasses the baked-in
  Chinese template at runtime) but its absence is now warned.

Tests: helper behaviors (flatten/tree/abort-with-full-list/optional
warning) + a structural pin that the audited recipes use the helper.
Suite 255 green.


Claude-Session: https://claude.ai/code/session_01HNcW12C5eFE9hCL2EnMYmW

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant