Skip to content

models scan: one models--* husk dir makes the whole store read as an empty HF cache #138

Closed

Description

@azrael-229

A model root that contains a single HuggingFace-cache-style directory is classified as an HF cache, even when that directory is an abandoned husk with no content. The HF-cache scan then finds no refs/blobs and the store reports zero models.

Repro (Windows, LM Studio store): F:\AI\.lmstudio\models contained 14 regular model directories (43 models, 391.6 GiB) plus one empty husk from an abandoned HF download:

models--mradermacher--Qwen3.5-9B-Nikusui-v1-i1-GGUF/
(no files at all — no refs/, no blobs/)

/v1/models and berth models reported 0 models. Removing only the husk (all 43 real models untouched) made the same scan report all 43.

So sourceOf() in internal/models/scan.go classifies the root by the presence of one models--* directory, and scanHFCache() ignores everything that is not in refs/blobs layout. One abandoned download shadows the whole store.

Suggestion: only classify a root as an HF cache when it actually has HF cache structure (refs/ or blobs/); scan the rest as a plain directory, or scan both layouts and merge.

Activity

  1. T-Crypt commented on Oct 22, 2026

    @T-Crypt
    Owner

    Thanks for the precise report and the repro. Fixed in #143: a models--* folder now counts as a HuggingFace cache only when it has snapshots/, so an empty leftover download no longer hides the store around it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions