fix(cogvideox): fail loudly when required pipeline files are missing#32
Merged
Conversation
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
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The published
dgrauet/CogVideoX-Fun-V1.5-5b-InP-mlx-q8shipped withoutspiece.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.modelin_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--sourcethat 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_FILESentry is required for a usable artifact, so any missing file now aborts the conversion with the full missing list. Flatteneda/b → a_bnaming unchanged (the VideoX-Fun-mlx tokenizer acceptstokenizer_spiece.model).Tests
tests/test_cogvideox_config_copy.py: full copy with flattened names; missingtokenizer/spiece.model→ SystemExit naming the file. Full suite 250 green.Follow-up noted in the commit
fish_s2,matrix_game_3_0andernie_image*share the same silentif 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