Repository navigation
Conversation
Member
|
Confirmed that /load in routes/inference.py still treats a repo id held only in a scan folder as remote and downloads it again, and this routes it through the local resolver with a clean fallback. Will get this reviewed. |
…of downloading it
VTplus
force-pushed
the
studio-scan-folder-local-load
branch
from
September 29, 2026 22:57
d4774dd to
5b56870
Compare
danielhanchen
added a commit
that referenced
this pull request
Oct 8, 2026
…ading it (#13034) A repo id whose complete GGUF copy lives only in a registered scan folder (or another local root outside the active hub cache) now loads that copy instead of downloading a duplicate into the hub cache. /validate uses the same rewrite so the chat flow also works without Hub access. The rewrite only applies to the owner's own Studio session, only to a GGUF snapshot of the requested repo, and never to a repo the active hub cache already serves. Responses keep the requested repo id, and bundled chat templates plus DeepSeek-V4 reasoning detection read an HF snapshot path as its repo id. Fixes #12253. Takes over #12254. Co-authored-by: Mathias Müller <[email protected]>
Contributor
Author
|
Closing in favor of #13034. The API-key-session variant still remote-downloads; I'll propose a PR as soon as it's tested. |
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.
Fixes #12253.
What
POST /api/inference/loadwith a repo-shaped id now asks the local model resolver first — the same index the OpenAI auto-switch path uses (./models, hub caches, LM Studio, Hermes, Ollama, registered scan folders). A hit rewrites the request to the local path and the load opens the weights already on disk; a miss is untouched and keeps the existing remote path (including pinned-quant misses).Why
Today a repo id that only exists in a scan folder is classified as remote and downloaded into the hub cache even though complete weights sit on disk (details in the issue).
Scope / guards
org/name-shaped ids; bare names keep theunsloth/<name>remote meaning._as_ollama_manifest_requestrewrite).Tests
studio/backend/tests/test_load_scan_folder_resolution.py, 9 cases: hit with/without pinned variant, legacy-alias replacement, miss, bare name, paths/manifest refs, resolver failure, managed account, native lease.Known limitations (deliberate)
Related: #6989 (grows what the resolver can hit), #11246 (orthogonal download targeting).