Repository navigation
fix(studio): keep distinct symlink aliases for per-model settings - #10644
Merged
danielhanchen merged 14 commits intoOct 2, 2026
Merged
danielhanchen merged 14 commits into
danielhanchen merged 14 commits into
Conversation
When several symlinks in a custom scan folder point at the same on-disk model, the Hub inventory now keeps one row per symlink path instead of collapsing them by physical identity. That lets each alias remember its own load settings after reload, which addresses unslothai#10605. Symlink plus canonical path, or symlink plus real file, still dedupe to one row. Mixed GGUF and safetensors rows at the same path are unchanged.
Assert identical symlink rows collapse once while distinct aliases stay separate.
This comment has been minimized.
This comment has been minimized.
Custom-folder dedupe kept every scanner row when multiple symlinks shared one physical model, so duplicate paths from _scan_models_dir and _scan_lmstudio_dir could appear twice in the Hub. Collapse duplicate paths first, then preserve distinct symlink aliases.
Walk parents for is_symlink so distinct symlink roots keep separate custom inventory rows when the discovered path is a weight file.
This was referenced Oct 1, 2026
danielhanchen
added a commit
to danielhanchen/unsloth-staging-2
that referenced
this pull request
Oct 1, 2026
Member
|
Review record for #10644, carried over from the mirror it was reviewed on: danielhanchen/unsloth-staging-review#289. Findings are quoted as posted and attributed to the account that posted them. The reactions shown are the triage recorded on the mirror; none were re-applied here. Commits are named as the mirror's, with this PR's equivalent where one was found. Round 1: reviewed mirror
|
danielhanchen
added a commit
to danielhanchen/unsloth-staging-2
that referenced
this pull request
Oct 1, 2026
danielhanchen
pushed a commit
to danielhanchen/unsloth-staging-2
that referenced
this pull request
Oct 1, 2026
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 #10605
Problem
When a local model in Unsloth Studio is reached through a symlink, per-model settings saved with "Remember for this model" did not reliably restore after reload. A common workaround — creating multiple symlinks to the same on-disk model so each Hub entry can carry its own settings — also failed because the inventory deduplicated symlink aliases by physical inode identity, leaving only one row.
Solution
Custom-model dedup in
local_inventory.pynow keeps one Hub row per symlink path when several symlinks in a scan folder point at the same model. Settings stay keyed by the path shown in the UI (load_id), so each alias can remember independent load settings.Existing collapse rules are preserved:
Tests
test_two_symlink_aliases_to_one_model_stay_distinct(backend)symlink alias paths keep independent remembered settings(frontend)Before / after
A scan folder holding two symlinks (
alias-a,alias-b) to one model folder with two GGUF quants. Before (merge basec0a60448e) the On Device list shows one row; after (d73032f26) it shows both aliases, so each keeps its own remembered settings.