Skip to content

Discover models across all drives; group split GGUF shards#79

Open
rjckkkkk wants to merge 1 commit into
developfrom
fix/windows-model-scan-discovery
Open

Discover models across all drives; group split GGUF shards#79
rjckkkkk wants to merge 1 commit into
developfrom
fix/windows-model-scan-discovery

Conversation

@rjckkkkk

@rjckkkkk rjckkkkk commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

On Windows the model scanner only looked at %USERPROFILE% directories, so
models on other drives (D:\models, D:\lmstudio\models, ...) were never
found and users had to set AIMA_MODEL_DIR by hand. Split GGUF shards were
each registered as a separate model, and mmproj projector files showed up
as standalone models — both break one-click deploy from the Web UI (a user
clicking a single shard would fail to load the model).

Scan discovery:

  • enumerate fixed/removable drives and probe conventional model dirs that
    exist (:\models, :\lmstudio\models, .ollama, HF hub). This
    stays targeted — it never walks whole drives, so recycle bins and system
    folders are not pulled in.
  • AIMA_MODEL_DIR now accepts a list (os.PathListSeparator) for custom dirs.
  • honor HF_HOME / OLLAMA_MODELS for relocated caches.
  • harden scanner.yaml skip list ($recycle.bin, system volume information,
    node_modules, .git, ...) so even an explicit drive-root scan stays clean.

GGUF grouping:

  • collapse "...-00001-of-000NN.gguf" shards into one logical model whose
    Path is the first shard (llama.cpp auto-loads the rest) and whose size is
    the sum of all parts — so deploy targets the whole model, not one piece.
  • drop mmproj projector files. The scanner already skips "mmproj" dirs
    (scanner.yaml); this covers the file-name form, so projectors no longer
    appear as deployable models.

Pure logic (groupGGUFModels, dedupePaths, DefaultScanPaths multi-path) is
table-driven tested. Verified on an AMD Strix Halo Windows box: a clean
scan now yields 22 grouped models across D:\model, D:\models,
D:\models-gguf and D:\lmstudio (drive auto-probe found the latter two on
its own), with no shards-as-models, no mmproj, and no recycle/tooling junk.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

On Windows the model scanner only looked at %USERPROFILE% directories, so
models on other drives (D:\models, D:\lmstudio\models, ...) were never
found and users had to set AIMA_MODEL_DIR by hand. Split GGUF shards were
each registered as a separate model, and mmproj projector files showed up
as standalone models — both break one-click deploy from the Web UI (a user
clicking a single shard would fail to load the model).

Scan discovery:
- enumerate fixed/removable drives and probe conventional model dirs that
  exist (<drive>:\models, <drive>:\lmstudio\models, .ollama, HF hub). This
  stays targeted — it never walks whole drives, so recycle bins and system
  folders are not pulled in.
- AIMA_MODEL_DIR now accepts a list (os.PathListSeparator) for custom dirs.
- honor HF_HOME / OLLAMA_MODELS for relocated caches.
- harden scanner.yaml skip list ($recycle.bin, system volume information,
  node_modules, .git, ...) so even an explicit drive-root scan stays clean.

GGUF grouping:
- collapse "...-00001-of-000NN.gguf" shards into one logical model whose
  Path is the first shard (llama.cpp auto-loads the rest) and whose size is
  the sum of all parts — so deploy targets the whole model, not one piece.
- drop mmproj projector files. The scanner already skips "mmproj" *dirs*
  (scanner.yaml); this covers the file-name form, so projectors no longer
  appear as deployable models.

Pure logic (groupGGUFModels, dedupePaths, DefaultScanPaths multi-path) is
table-driven tested. Verified on an AMD Strix Halo Windows box: a clean
scan now yields 22 grouped models across D:\model, D:\models,
D:\models-gguf and D:\lmstudio (drive auto-probe found the latter two on
its own), with no shards-as-models, no mmproj, and no recycle/tooling junk.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant