[GH-ISSUE #4726] [GUI] A model loaded from existing files ("use files I have") is never registered — no autostart, local importer refuses qwen4exp, native load says "not installed" #2164

Open
opened 2026-11-04 01:57:10 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @lucapug on GitHub (Oct 30, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4726

Area

[GUI] (the desktop app)

Desktop app, Terminal or source?

Desktop app (Windows, Linux or Mac)

What happened

Model files (shards + .done markers), prepared pack, MTP draft layer and mmproj all live in the data folder (C:\Strata-data), downloaded by the source-install setup before installing the desktop app. The wizard's "use files I have" loads and serves the model perfectly (262144 context, vision, ~90 tok/s) — but nothing is persisted, so the model never comes back and cannot be loaded programmatically. Four findings:

  1. No persistence. After a successful load, the host store has loaded: null, current: null, installed: {}; no local-models.json is created. The server's autostart (STRATA_REAL_ENGINE + store.get().loaded ?? store.get().current, plus the isOnDisk guard) therefore has nothing to load: after every restart /v1/models is empty, with no error and no log line (the autostart guard exits silently).

  2. The local-model importer refuses the architecture. POST /api/local-models/inspect on the shard returns: "The declared architecture qwen4exp is not supported by this importer. This model type isn't supported by the Strata engine; add it as a Custom model API (llama-server) instead." — but the Strata engine runs this architecture fine (it's the app's own flagship family). The importer's architecture set (qwen2…qwen35moe, llama, gemma*, phi3) predates qwen4exp, so file-based Qwen3.8 can never be registered as a local model.

  3. The native load refuses it too. POST /api/native/operations {"kind":"load","args":{"model":"qwen3.8-flash-next-iq2_xs"}} fails with "This model is not installed. Download and prepare it first." — even though shards, .done markers, prepared pack, draft layer and mmproj are all present. (Clicking Load in the app works, so the model loads — it just cannot be reached programmatically or persisted.)

  4. Changing the Models Directory wipes the registration. setModelsDir resets installed / current / loaded when the folder changes, so moving a data folder erases whatever was registered under the old path.

Net effect: for models whose weights were downloaded outside the app, the desktop app cannot autostart them — one manual load after every boot.

Smallest steps or command that reproduce it

  1. Place model files + prepared pack + draft layer in <data>\models\<quant> (as the source setup lays them out)
  2. Install the desktop app, point its data folder at <data>
  3. Wizard → "use files I have" → select the shard → model loads and serves ✓
  4. Close and reopen the app → /v1/models is empty, with no error and no log line
  5. state.json shows loaded: null, current: null, installed: {}; local-models.json absent
  6. POST /api/local-models/inspect → qwen4exp refusal; POST /api/native/operations kind:load → "not installed" refusal

Reproduction status

Reproduced locally

Strata version

Strata 0.2.7 · Terminal 0.1.54 · Control 0.1.54 · engine 0.1.52 → 0.1.54

Graphics card, memory and system

RTX 3090 24 GB (Thunderbolt eGPU) · 64 GB RAM · Windows 11 Pro 26H2

Model, size and settings

Qwen3.8-Flash-Next IQ2_XS · 262144 context · pictures on

Logs

After a fresh start, the app log contains only:

[host] inference    ·  Strata engine 0.1.52 is installed; no model is loaded yet

(no autostart attempt is logged — the guard exits before logging). The two API refusals:

POST /api/local-models/inspect  →  "The declared architecture qwen4exp is not supported by this importer. This model type isn't supported by the Strata engine; add it as a Custom model API (llama-server) instead."
POST /api/native/operations {"kind":"load"}  →  "This model is not installed. Download and prepare it first."

Details and workaround

  • Expected: a model loaded from existing files should be registered in the store/library so the server autostart reloads it at the next launch — or the importer should accept file sets whose architecture the engine supports (qwen4exp).
  • Related: #4540 (the TUI counterpart — selecting "Use model files I already have" does not clearly reflect the provided model).
  • Workaround that works today: Terminal 0.1.54, strata launch --model-path … --no-tui (or a saved preset) serves the same files headlessly and persists the preset; otherwise one manual load per boot.
Originally created by @lucapug on GitHub (Oct 30, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4726 ### Area [GUI] (the desktop app) ### Desktop app, Terminal or source? Desktop app (Windows, Linux or Mac) ### What happened Model files (shards + `.done` markers), prepared pack, MTP draft layer and mmproj all live in the data folder (`C:\Strata-data`), downloaded by the source-install setup before installing the desktop app. The wizard's "use files I have" loads and serves the model perfectly (262144 context, vision, ~90 tok/s) — but nothing is persisted, so the model never comes back and cannot be loaded programmatically. Four findings: 1. **No persistence.** After a successful load, the host store has `loaded: null`, `current: null`, `installed: {}`; no `local-models.json` is created. The server's autostart (`STRATA_REAL_ENGINE` + `store.get().loaded ?? store.get().current`, plus the `isOnDisk` guard) therefore has nothing to load: after every restart `/v1/models` is empty, with no error and no log line (the autostart guard exits silently). 2. **The local-model importer refuses the architecture.** `POST /api/local-models/inspect` on the shard returns: "The declared architecture qwen4exp is not supported by this importer. This model type isn't supported by the Strata engine; add it as a Custom model API (llama-server) instead." — but the Strata engine runs this architecture fine (it's the app's own flagship family). The importer's architecture set (`qwen2…qwen35moe, llama, gemma*, phi3`) predates `qwen4exp`, so file-based Qwen3.8 can never be registered as a local model. 3. **The native load refuses it too.** `POST /api/native/operations {"kind":"load","args":{"model":"qwen3.8-flash-next-iq2_xs"}}` fails with "This model is not installed. Download and prepare it first." — even though shards, `.done` markers, prepared pack, draft layer and mmproj are all present. (Clicking Load in the app works, so the model loads — it just cannot be reached programmatically or persisted.) 4. **Changing the Models Directory wipes the registration.** `setModelsDir` resets `installed` / `current` / `loaded` when the folder changes, so moving a data folder erases whatever was registered under the old path. Net effect: for models whose weights were downloaded outside the app, the desktop app cannot autostart them — one manual load after every boot. ### Smallest steps or command that reproduce it 1. Place model files + prepared pack + draft layer in `<data>\models\<quant>` (as the source setup lays them out) 2. Install the desktop app, point its data folder at `<data>` 3. Wizard → "use files I have" → select the shard → model loads and serves ✓ 4. Close and reopen the app → `/v1/models` is empty, with no error and no log line 5. `state.json` shows `loaded: null`, `current: null`, `installed: {}`; `local-models.json` absent 6. `POST /api/local-models/inspect` → qwen4exp refusal; `POST /api/native/operations kind:load` → "not installed" refusal ### Reproduction status Reproduced locally ### Strata version Strata 0.2.7 · Terminal 0.1.54 · Control 0.1.54 · engine 0.1.52 → 0.1.54 ### Graphics card, memory and system RTX 3090 24 GB (Thunderbolt eGPU) · 64 GB RAM · Windows 11 Pro 26H2 ### Model, size and settings Qwen3.8-Flash-Next IQ2_XS · 262144 context · pictures on ### Logs After a fresh start, the app log contains only: ``` [host] inference · Strata engine 0.1.52 is installed; no model is loaded yet ``` (no autostart attempt is logged — the guard exits before logging). The two API refusals: ``` POST /api/local-models/inspect → "The declared architecture qwen4exp is not supported by this importer. This model type isn't supported by the Strata engine; add it as a Custom model API (llama-server) instead." POST /api/native/operations {"kind":"load"} → "This model is not installed. Download and prepare it first." ``` ### Details and workaround - Expected: a model loaded from existing files should be registered in the store/library so the server autostart reloads it at the next launch — or the importer should accept file sets whose architecture the engine supports (`qwen4exp`). - Related: #4540 (the TUI counterpart — selecting "Use model files I already have" does not clearly reflect the provided model). - Workaround that works today: Terminal 0.1.54, `strata launch --model-path … --no-tui` (or a saved preset) serves the same files headlessly and persists the preset; otherwise one manual load per boot.
Author
Owner

@github-actions[bot] commented on GitHub (Oct 30, 2026):

Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:

  • Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes".

Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.

Details: CONTRIBUTING.md

<!-- gh-comment-id:6528151164 --> @github-actions[bot] commented on GitHub (Oct 30, 2026): Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing: - [ ] Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes". Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment `/reopen`. Details: [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
Author
Owner

@github-actions[bot] commented on GitHub (Oct 31, 2026):

Thanks, this follows the format now.

<!-- gh-comment-id:6541392868 --> @github-actions[bot] commented on GitHub (Oct 31, 2026): Thanks, this follows the format now.
Author
Owner

@Niko1221 commented on GitHub (Oct 31, 2026):

Thanks for the detailed write-up. Where we are, part by part:

  • Part 2 (the importer refused qwen4exp): fixed. The local-model importer now accepts the Qwen3.8-Flash-Next family instead of sending it to llama-server. This goes into the next update, 0.2.9.1.
  • Part 4 (changing the models folder wipes the registration): reading the code, it keeps the list of installed models separately for each folder and brings it back when you switch back. What does reset on a change is "current" and "loaded", because the models are unloaded first. So nothing should be lost for good, but it looks that way. We didn't find a function called setModelsDir; the folder change is POST /api/storage/models-directory. If you saw something else, tell us where.
  • Parts 1 and 3 (nothing is written after "use files I have", and the native load says "not installed"): we can't reproduce this from the code, and we have no Windows PC with an eGPU to try it on. The app lists a model as installed when a strata-<model>.json run config exists in the installation folder. To find where it goes wrong, we need:
    1. Does a strata-<model>.json exist in the folder the app uses, after the model has loaded once?
    2. Your state.json before and after pressing Prepare and load (remove anything private).
    3. Whether the app points at a source checkout (the "installation folder" setting) or the packaged install.
    4. The last 100 lines of the app log from that load.
<!-- gh-comment-id:6542508008 --> @Niko1221 commented on GitHub (Oct 31, 2026): Thanks for the detailed write-up. Where we are, part by part: - Part 2 (the importer refused qwen4exp): fixed. The local-model importer now accepts the Qwen3.8-Flash-Next family instead of sending it to llama-server. This goes into the next update, 0.2.9.1. - Part 4 (changing the models folder wipes the registration): reading the code, it keeps the list of installed models separately for each folder and brings it back when you switch back. What does reset on a change is "current" and "loaded", because the models are unloaded first. So nothing should be lost for good, but it looks that way. We didn't find a function called `setModelsDir`; the folder change is `POST /api/storage/models-directory`. If you saw something else, tell us where. - Parts 1 and 3 (nothing is written after "use files I have", and the native load says "not installed"): we can't reproduce this from the code, and we have no Windows PC with an eGPU to try it on. The app lists a model as installed when a `strata-<model>.json` run config exists in the installation folder. To find where it goes wrong, we need: 1. Does a `strata-<model>.json` exist in the folder the app uses, after the model has loaded once? 2. Your `state.json` before and after pressing Prepare and load (remove anything private). 3. Whether the app points at a source checkout (the "installation folder" setting) or the packaged install. 4. The last 100 lines of the app log from that load.
Author
Owner

@tangd commented on GitHub (Nov 1, 2026):

Reproducing part 3 ('native load says not installed') on 0.2.9, with the mechanism.
Setup. Windows 11 (10.0.26300), RTX 5090 D 32 GB, 254 GB RAM. App 0.2.9, control 0.1.55, engine 0.1.55
(build 99866a47a2b8+cuda13.0). Model: Unsloth DeepSeek-V4.1-Flash UD-IQ1_M (5 shards + Engram + dSpark + mmproj),
downloaded with modelscope into
C:\Users\<me>\.cache\modelscope\models\unsloth--DeepSeek-V4.1-Flash-1017-GGUF\snapshots\master\
(the set in a UD-IQ1_M/ subfolder, dspark and mmproj beside it), context 128K.
What I did. Models -> 'Use local GGUF' -> picked ...\snapshots\master (the folder above the set's own folder).
The app identified it correctly: 'DeepSeek-V4.1-Flash - UD-IQ1_M - 5 files - 233 GiB', 'all 4 model files are here,
and the n-gram table'. Then 'Prepare and load'.
Result. The prepare succeeds, then the job fails with the 'not installed' message:

{"kind":"install","state":"error",
 "summary":"This model is not installed. Download and prepare it first.",
 "result":{"summary":"the last install installed",
   "install":{"step":"7/7: writing the start script","phase":"settings",
              "result":"installed","exit_code":0,
              "last_lines":["=== Step 6: preparing the model for Strata ===",
                "  [ok] pack: C:\Users\<me>\Documents\Strata\packs\deepseek-v4.1-flash-ud-iq1_m (checked: every file the engine needs is there)",
                "  Testing the model with a short question (a few minutes: the engine reads the first experts from the disk) ...",
                "  [ok] test question answered sensibly",
                "  [ok] start script: run-deepseek-v4.1-flash-ud-iq1_m.bat",
                "All set."]}}}

At that moment the model IS installed, so the message is false (same as #4511 part 2):

$ strata models list --installed --output json
{"models":[{"id":"deepseek-v4.1-flash-ud-iq1_m","name":"deepseek-v4.1-flash",
            "component_status":"present","missing":[],"issue_codes":[]}],"model_count":1}
GET /api/native -> installed.models[0] = {"model":"deepseek-v4.1-flash-ud-iq1_m",
  "config":"strata-deepseek-v4.1-flash-ud-iq1_m.json","ready":true,"missingFiles":[]}

Where it goes wrong. After the install job, loadEngine(job, args) in host/server/native-control.mjs
calls recordFile(args.model). For a model prepared from local files, args.model is the catalog/setup key
("UD-IQ1_M"), while snapshot.installed.models[].model is the run-config id derived from the config file name
(deepseek-v4.1-flash-ud-iq1_m = family tag deepseek-v4.1-flash- + ud-iq1_m). recordFile only does an exact
comparison:

function recordFile(model){
  if(!safeId(model)) throw new Error('Choose an installed model.');
  const entry = snapshot.installed?.models?.find(i => i.model === model);
  if(!entry) throw new Error('This model is not installed. Download and prepare it first.');

So the lookup misses and the app reports the model as not installed, right after it wrote and verified it.
Loading the same model from the Models list works (that path passes the config id), which matches #4726.
Fix (either):

  1. After the install job, resolve the installed id from the run config that was just written (the job result already
    knows the model it installed) and pass that to loadEngine, instead of the raw catalog key; or
  2. give recordFile a fallback that matches i.model.toLowerCase().endsWith('-' + model.toLowerCase())
    (UD-IQ1_M -> deepseek-v4.1-flash-ud-iq1_m).
    I applied (2) locally as a workaround and 'Prepare and load' then starts the model. Worth also saying 'the fresh config
    was not found' instead of 'not installed': the current text sends people to re-download 233 GB.
<!-- gh-comment-id:6553900295 --> @tangd commented on GitHub (Nov 1, 2026): Reproducing part 3 ('native load says not installed') on 0.2.9, with the mechanism. **Setup.** Windows 11 (10.0.26300), RTX 5090 D 32 GB, 254 GB RAM. App 0.2.9, control 0.1.55, engine 0.1.55 (build 99866a47a2b8+cuda13.0). Model: Unsloth **DeepSeek-V4.1-Flash UD-IQ1_M** (5 shards + Engram + dSpark + mmproj), downloaded with modelscope into `C:\Users\<me>\.cache\modelscope\models\unsloth--DeepSeek-V4.1-Flash-1017-GGUF\snapshots\master\` (the set in a `UD-IQ1_M/` subfolder, dspark and mmproj beside it), context 128K. **What I did.** Models -> 'Use local GGUF' -> picked `...\snapshots\master` (the folder above the set's own folder). The app identified it correctly: 'DeepSeek-V4.1-Flash - UD-IQ1_M - 5 files - 233 GiB', 'all 4 model files are here, and the n-gram table'. Then 'Prepare and load'. **Result.** The prepare succeeds, then the job fails with the 'not installed' message: ``` {"kind":"install","state":"error", "summary":"This model is not installed. Download and prepare it first.", "result":{"summary":"the last install installed", "install":{"step":"7/7: writing the start script","phase":"settings", "result":"installed","exit_code":0, "last_lines":["=== Step 6: preparing the model for Strata ===", " [ok] pack: C:\Users\<me>\Documents\Strata\packs\deepseek-v4.1-flash-ud-iq1_m (checked: every file the engine needs is there)", " Testing the model with a short question (a few minutes: the engine reads the first experts from the disk) ...", " [ok] test question answered sensibly", " [ok] start script: run-deepseek-v4.1-flash-ud-iq1_m.bat", "All set."]}}} ``` At that moment the model IS installed, so the message is false (same as #4511 part 2): ``` $ strata models list --installed --output json {"models":[{"id":"deepseek-v4.1-flash-ud-iq1_m","name":"deepseek-v4.1-flash", "component_status":"present","missing":[],"issue_codes":[]}],"model_count":1} GET /api/native -> installed.models[0] = {"model":"deepseek-v4.1-flash-ud-iq1_m", "config":"strata-deepseek-v4.1-flash-ud-iq1_m.json","ready":true,"missingFiles":[]} ``` **Where it goes wrong.** After the install job, `loadEngine(job, args)` in `host/server/native-control.mjs` calls `recordFile(args.model)`. For a model prepared from local files, `args.model` is the catalog/setup key (`"UD-IQ1_M"`), while `snapshot.installed.models[].model` is the run-config id derived from the config file name (`deepseek-v4.1-flash-ud-iq1_m` = family tag `deepseek-v4.1-flash-` + `ud-iq1_m`). `recordFile` only does an exact comparison: ```js function recordFile(model){ if(!safeId(model)) throw new Error('Choose an installed model.'); const entry = snapshot.installed?.models?.find(i => i.model === model); if(!entry) throw new Error('This model is not installed. Download and prepare it first.'); ``` So the lookup misses and the app reports the model as not installed, right after it wrote and verified it. Loading the same model from the Models list works (that path passes the config id), which matches #4726. **Fix (either):** 1. After the install job, resolve the installed id from the run config that was just written (the job result already knows the model it installed) and pass that to `loadEngine`, instead of the raw catalog key; or 2. give `recordFile` a fallback that matches `i.model.toLowerCase().endsWith('-' + model.toLowerCase())` (`UD-IQ1_M` -> `deepseek-v4.1-flash-ud-iq1_m`). I applied (2) locally as a workaround and 'Prepare and load' then starts the model. Worth also saying 'the fresh config was not found' instead of 'not installed': the current text sends people to re-download 233 GB.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#2164
No description provided.