chore(models): mirror all aggregate models to dedicated HF repos - #832
Conversation
Round 2: QtMeshEditor-{realesrgan-onnx,u2net-onnx,smolvlm-gguf}, and
motion-library.json into the existing t2m repo — every file in the
aggregate repo now has a dedicated mirror with its own card + license.
Sync script gains a repo map (covers -gguf and the t2m special case).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe PR expands third-party model attribution links and updates the Hugging Face synchronization script with explicit repository mappings and additional model file groups. ChangesModel mirror synchronization
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5c255d98a7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| sync_one() { | ||
| local model=$1 repo="$OWNER/QtMeshEditor-$1-onnx" | ||
| local model=$1 repo="$OWNER/${REPOS[$model]}" |
There was a problem hiding this comment.
Split the local assignments before indexing REPOS
With set -u, Bash expands the right-hand sides of this local command before model=$1 is in scope, so ${REPOS[$model]} reads an unset model variable and every sync_one invocation exits immediately with model: unbound variable. Split this into separate assignments before looking up REPOS[$model] so the mirror sync can run at all.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/sync-hf-model-repos.sh`:
- Line 59: Split the combined declaration in the model-processing function:
first declare and assign local model from $1, then separately declare repo using
$OWNER and ${REPOS[$model]}. This ensures model is initialized before the array
lookup and avoids SC2318 and incorrect repository paths.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: f23da279-87e9-420f-9baa-3d21de37fc6c
📒 Files selected for processing (2)
THIRD_PARTY_AI_MODELS.mdscripts/sync-hf-model-repos.sh
|
|
||
| sync_one() { | ||
| local model=$1 repo="$OWNER/QtMeshEditor-$1-onnx" | ||
| local model=$1 repo="$OWNER/${REPOS[$model]}" |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
Split local declaration to avoid SC2318 — model may not be assigned when repo is evaluated.
In local model=$1 repo="$OWNER/${REPOS[$model]}", bash may evaluate ${REPOS[$model]} before model has taken effect (pre-5.0 behavior). With set -u, this yields an empty repo path ("fernandotonon/"), causing the upload to fail. ShellCheck flags this as SC2318.
🔧 Proposed fix
sync_one() {
- local model=$1 repo="$OWNER/${REPOS[$model]}"
+ local model=$1
+ local repo="$OWNER/${REPOS[$model]}"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| local model=$1 repo="$OWNER/${REPOS[$model]}" | |
| local model=$1 | |
| local repo="$OWNER/${REPOS[$model]}" |
🧰 Tools
🪛 Shellcheck (0.11.0)
[warning] 59-59: This assignment is used again in this 'local', but won't have taken effect. Use two 'local's.
(SC2318)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@scripts/sync-hf-model-repos.sh` at line 59, Split the combined declaration in
the model-processing function: first declare and assign local model from $1,
then separately declare repo using $OWNER and ${REPOS[$model]}. This ensures
model is initialized before the array lookup and avoids SC2318 and incorrect
repository paths.
Source: Linters/SAST tools
|



Follow-up to the HF hosting split: every file in the aggregate
fernandotonon/QtMeshEditor-modelsrepo now has a dedicated mirror repo with its own model card and license — this round addsQtMeshEditor-realesrgan-onnx(BSD-3),QtMeshEditor-u2net-onnx(Apache-2.0),QtMeshEditor-smolvlm-gguf(Apache-2.0), and mirrorsmotion-library.jsoninto the existingQtMeshEditor-t2mrepo.scripts/sync-hf-model-repos.shgains a repo map covering the-ggufsuffix and the t2m special case;THIRD_PARTY_AI_MODELS.mdlinks the new mirrors. Docs/script only — no app code.🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
Maintenance