Repository navigation
Conversation
…as no weights A download that never completes leaves a weightless refs/snapshot skeleton in the active cache - from a repo-id load that resolved remotely, a pinned variant the parked copy does not carry, or an abort mid-flight. The skeleton scans as complete, so the catalog dedupe collapsed the parked scan-folder copy into it and the servability stage dropped the row: the model vanished from /v1/models and /models/local although a loadable copy existed. Key the parked copy by its own path so it is listed again whatever left the skeleton behind.
…talog # Conflicts: # studio/backend/routes/models.py
…tudio-scan-folder-catalog # Conflicts: # studio/backend/routes/models.py
…s new ComfyUI scan helper Upstream inserted _with_comfy_compat_rows right where this branch defines _merge_scan_folder_row; the merge keeps both. Resolves the routes/models.py conflict; catalog suites re-run green (231/5/35 passed).
…g - sync branch with upstream before re-cutting the patch No changes to the three patch files (empty ^1 diff); pure upstream sync ahead of the patch re-cut.
…dress the branch review before re-cutting the patch Pin omlx_model_dirs like Ollama/Hermes, or a machine with oMLX adds roots and rows the exact-equality assertions fail on. The new test pins the known limit: a parked copy whose newest snapshot holds no quant is listed in the picker but not in /v1/models, until the resolver keys on the layout, not the source.
A cache-layout copy parked in a scan folder now lists as a custom row. Two consumers still keyed on the old hf_cache label: - local_model_resolver skipped the newest-complete-snapshot selection for it, so /v1/models advertised a split quant that was missing a shard, or dropped a parked copy whose newest snapshot held no quant. Apply that selection to custom rows with a cache layout too. - the relabel cleared model_id on every parked row, so a parked-only image model no longer resolved by repo id in the media index. Clear it only when another row already answers to that repo id; the first parked copy keeps it.
The previous commit applied the newest-complete-snapshot selection to every custom row under a models--*/snapshots layout. A scan folder registered at a models--* repo dir lists each snapshot as its own row, so an older snapshot then advertised the newer snapshot's quant and a pin on it missed. Redirect a custom row only when it is the snapshot the cache scan itself names (the relabeled parked copy); every other snapshot row keeps its exact directory.
|
When an aborted download leaves a weightless skeleton in the active HF cache and a complete copy sits in a registered scan folder, the parked copy now stays servable:
What changed
Still openEach of these is a regression compared with main, reproduced on
All three come from the catalog relabeling parked rows to The two touched backend test files pass at |
|
Thanks @Etherll for the thorough review — and for the two commits you added to the branch; I will build on them. I aim to solve the three highlighted regressions while keeping the separate Custom Folders row for the parked copy, which is what this PR and #12258 aim for. The rework will keep the catalog consistent with the resolver order introduced by #13034 (merged), which this branch already includes. As a first step, I will sync the forked branches to current main before the rework. |
…g - sync branch with upstream before re-cutting the patch 190 upstream commit(s) since the branch base; see git log for the range.
…g - sync branch with upstream before re-cutting the patch 125 upstream commit(s) since the branch base; see git log for the range.
…g - sync branch with upstream before re-cutting the patch 100 upstream commit(s) since the branch base; see git log for the range.
… claim A quant pin resolves to the row holding that quant (alternates beside the cache-first key, per the unslothai#13034 chosen-artifact ordering), /v1/models advertises the row a bare id loads, and only a row with weights claims a repo id.
A save folder inside models--*/snapshots/ would read back as the repo's newest revision; the default now falls back to the exports root.
|
@Etherll — Thanks again, all three regressions are addressed now ( 1) Quant race — a pin names the exact artifact, so the row holding that quant answers it. The resolver keeps caches first for a bare id (the 2) Repo id claimed by a weightless/partial cache row — a row claims its repo id only when it holds weights. A weightless skeleton or a partial download keeps its row but no longer takes the id away from the loadable parked copy, so the media index resolves the id again (the skeleton itself throws no picks, so the id stays unambiguous). 3) Export default inside Each case has a test on the reported scenario (not just the mitigations): pinned quant and listing takeover, weightless and partial claims, and a frontend test for the save-dir guard. The existing anchors (newest-complete snapshot selection, complete-quants-only advertisement, one-id-per-parked-copy) are unchanged and green. Verified on top of current main — the branch merges clean and the suites stayed green across the last upstream commits, three of which touch the same files. Known limitation:
Could you re-run the CI staging when you have a moment? |
…g - sync branch with upstream before re-cutting the patch 65 upstream commit(s) since the branch base; see git log for the range.
…g - sync branch with upstream 27 upstream commit(s) since the branch base; see git log for the range.
…g - sync branch with upstream 72 upstream commit(s) since the branch base; see git log for the range.
…g - sync branch with upstream 92 upstream commit(s) since the branch base; see git log for the range.
…sable A partial cache row whose older revision is complete still serves, so it keeps the repo id and the listing follows the load; companions and shard fragments no longer count as weights, the miss message names the pinnable legacy spellings, and the GGUF save-dir default refuses cache-shaped destinations. The media index admits such a row and picks from its newest complete snapshot.
…g - sync branch with upstream 29 upstream commit(s) since the branch base; see git log for the range.
…uping Merge origin/main (e795149, 102 upstream commits) and combine both index features in _LocalGgufEntry: parked scan-folder copies stay listed as alternates beside an incomplete cache skeleton, and the resolver now also groups every GGUF build that shares a quant in a custom folder (unslothai#13957).
The serving correction re-targeted partial rows to the newest complete snapshot only when the row named a repo dir. A parked scan-folder copy names the snapshot itself, so the media index listed the torn revision only and dropped the offer while chat kept serving the older complete revision. Resolve the cache-layout claim dir for both shapes and re-target the picks, by path for a parked copy -- its repo id belongs to the active cache, not to the copy.
…g - sync branch with upstream 1077 upstream commit(s) since the branch base; see git log for the range.
|
Updated the PR branch. The fix addresses a catalog case where an incomplete download leaves a cache entry without model weights: deduplication prefers that entry over a complete GGUF copy in a registered scan folder, so /v1/models and /models/local omit the model even though Model Hub shows it. Together, #12258, #12803, and #13343 improve support for complete model copies stored in registered Custom Folders. |
…g - sync branch with upstream 331 upstream commit(s) since the branch base; see git log for the range.
…g - sync branch with upstream 33 upstream commit(s) since the branch base; see git log for the range.
…g - sync branch with upstream 284 upstream commit(s) since the branch base; see git log for the range.
…ch with upstream
…g - sync branch with upstream 1052 upstream commit(s) since the branch base; see git log for the range.

Same use case (custom scan folders) as #12253/#12254/#12258: models neither visible in the picker nor listed via API.
This PR fixes the catalog side — the walk
GET /v1/modelsandGET /models/localshare.What
collect_local_modelsre-attributes a cache-layout copy found in a registered scan folder outside the configured HF caches as the user's custom row, so the repo-id dedupe no longer collapses it into the same-repo active-cache entry. The servability stage then keeps whichever copy actually has weights.A folder registered over a configured cache keeps the
hf_cacheattribution (#9986). A repo cached completely and parked lists both rows locally;/v1/modelsstill dedupes them to one id.Why
refs/mainand the snapshot dir appear before any blob lands, so a download that never completes leaves a ~1 KB skeleton behind — from a repo-id load that resolved remotely (the load side #12254 fixes), a pinned variant the parked copy does not carry, or an abort mid-flight.The skeleton scans as complete (nothing ever named a quant, the ref resolves), so the dedupe prefers the active-cache row, discards the parked copy, and the servability check then drops the skeleton for holding no servable GGUF.
In these cases, the repo disappears from the catalog although a loadable copy is on disk.
GET /v1/modelsomitsorg/Model-GGUFuntil the skeleton is deleted by hand.Tests
test_cached_gguf_routes.py: skeleton + parked copy yields both rows (cache keeps the repo id, parked copy keyed by its path) with only the parked one servable; folders over the active or a known cache keep thehf_cachelabel and dedupe to one row.test_local_model_format.py: a registered HF home lists as custom (mirroring the Hub inventory promotion in Studio: show HF-cache-layout models from registered scan folders in the chat picker #12258; plain files, no symlink privilege needed).Known limitations
source="hf_cache"— that side is Studio: show HF-cache-layout models from registered scan folders in the chat picker #12258.