Attach mmproj sidecar when scanning HF cache so models.ini includes it#101
Open
robnightingale wants to merge 1 commit into
Open
Attach mmproj sidecar when scanning HF cache so models.ini includes it#101robnightingale wants to merge 1 commit into
robnightingale wants to merge 1 commit into
Conversation
…udes it buildSideloadedEntry hardcoded mmprojFile: nil, and collectGgufFiles filters mmproj files out of the runnable-model set, so the cache scan — the source of resolvedPaths used to generate models.ini — never carried the projector. generateModelsFileContent's `if let mmprojPath` branch therefore never fired, and vision models loaded without their mmproj. Resolve the lone mmproj*.gguf sidecar in the model's directory (skip when ambiguous, matching HFRepoResolver.pickMmproj) and pass it to ResolvedPaths.mmprojFile. Also fold its size into the aggregate so it matches Model.fileSize's documented main + shards + mmproj contract. Co-Authored-By: Claude Opus 4.8 (1M context) <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
Vision models discovered via the Hugging Face cache scan loaded without their
mmprojprojector, so they ran without vision support.The cache scan is the source of the
resolvedPathsused to generatemodels.ini. Two things conspired to drop the projector:buildSideloadedEntryhardcodedmmprojFile: nil.collectGgufFilesfiltersmmproj*.ggufout of the runnable-model set.As a result the projector never made it into
ResolvedPaths, theif let mmprojPathbranch ingenerateModelsFileContentnever fired, and themmproj =line was omitted frommodels.ini.Fix
mmproj*.ggufsidecar sitting alongside the model file and pass it through toResolvedPaths.mmprojFile.HFRepoResolver.pickMmproj's behavior.Model.fileSize's documentedmain + shards + mmprojcontract.Scope
One file,
Llama/System/HFCache.swift(+29 / −3).🤖 Generated with Claude Code