[GH-ISSUE #4209] [TUI] strata launch with a saved preset cannot re-install: setup.py refuses the lower-case model tag #1850

Closed
opened 2026-11-04 01:54:42 +07:00 by bsakaguchi · 5 comments
Owner

Originally created by @lsxxbcz on GitHub (Oct 26, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4209

What happens

Starting a saved preset with any choice that differs from the installed config (I used --vision off; --context and --kv do the same) makes launch run setup.py again. Setup stops at once:

  Preparing qwen iq3_xxs from your model files…  0%       Getting your model ready
strata: The model could not be installed. Run it again: finished steps are skipped.
        Details: C:\Users\<user>\AppData\Local\Strata\launch\iq3_xxs-256k.setup.log

The setup log ends with:

setup.py: error: argument --model: invalid choice: 'iq3_xxs' (choose from 'Q2_0', 'IQ2_XS', 'IQ3_XXS', 'IQ3_S', ...)

Why

  • strata_cli/launch/settings.py saves the model into the choices as a lower-case tag (f"--model {s.model.lower()}"), so a preset/choices file carries "model": "iq3_xxs".
  • LaunchRunner.setup_args() in strata_cli/launch/runner.py forwards it unchanged: fam, model = s.family, s.model → ["--yes", "--no-start", "--family", "qwen", "--model", "iq3_xxs"].
  • setup.py's --model choices are the MODELS table's own keys (IQ3_XXS, Gyro-S, ...), case-sensitive, so argparse rejects it.
  • --model iq3_xxs typed on the command line works, because cmd.py normalises through Catalog.resolve() (n.lower() == model.lower()); the preset/choices path never goes through it.

Fix that works here (in setup_args)

fam, model = s.family, s.model
try:
    fam, model = cat.resolve(str(model), str(fam))   # cat = self.catalog
except Exception:                                    # an unknown name is setup's to report
    pass

Checked on 0.2.6

The same lines are on main at 4b9e05a2 (v0.2.6), so it is not fixed there yet.

Where

Windows 11, Terminal 0.2.4.2, engine 0.1.49.2 built locally, RTX 5070 Laptop (8 GB), Qwen3.8-Flash-Next IQ3_XXS from own files:

strata launch --preset iq3_xxs-256k --vision off --no-tui

The same preset with --vision cpu starts fine: it matches the installed config, so setup is skipped.

Originally created by @lsxxbcz on GitHub (Oct 26, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4209 ## What happens Starting a saved preset with any choice that differs from the installed config (I used `--vision off`; `--context` and `--kv` do the same) makes launch run setup.py again. Setup stops at once: ``` Preparing qwen iq3_xxs from your model files… 0% Getting your model ready strata: The model could not be installed. Run it again: finished steps are skipped. Details: C:\Users\<user>\AppData\Local\Strata\launch\iq3_xxs-256k.setup.log ``` The setup log ends with: ``` setup.py: error: argument --model: invalid choice: 'iq3_xxs' (choose from 'Q2_0', 'IQ2_XS', 'IQ3_XXS', 'IQ3_S', ...) ``` ## Why - `strata_cli/launch/settings.py` saves the model into the choices as a lower-case tag (`f"--model {s.model.lower()}"`), so a preset/choices file carries `"model": "iq3_xxs"`. - `LaunchRunner.setup_args()` in `strata_cli/launch/runner.py` forwards it unchanged: `fam, model = s.family, s.model` → `["--yes", "--no-start", "--family", "qwen", "--model", "iq3_xxs"]`. - setup.py's `--model` choices are the `MODELS` table's own keys (`IQ3_XXS`, `Gyro-S`, ...), case-sensitive, so argparse rejects it. - `--model iq3_xxs` typed on the command line works, because `cmd.py` normalises through `Catalog.resolve()` (`n.lower() == model.lower()`); the preset/choices path never goes through it. ## Fix that works here (in `setup_args`) ```python fam, model = s.family, s.model try: fam, model = cat.resolve(str(model), str(fam)) # cat = self.catalog except Exception: # an unknown name is setup's to report pass ``` ## Checked on 0.2.6 The same lines are on `main` at 4b9e05a2 (v0.2.6), so it is not fixed there yet. ## Where Windows 11, Terminal 0.2.4.2, engine 0.1.49.2 built locally, RTX 5070 Laptop (8 GB), Qwen3.8-Flash-Next IQ3_XXS from own files: ``` strata launch --preset iq3_xxs-256k --vision off --no-tui ``` The same preset with `--vision cpu` starts fine: it matches the installed config, so setup is skipped.
Author
Owner

@github-actions[bot] commented on GitHub (Oct 26, 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:6414176195 --> @github-actions[bot] commented on GitHub (Oct 26, 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 26, 2026):

Thanks, this follows the format now.

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

@XiaoBinGan commented on GitHub (Oct 27, 2026):

A fix for this is in #4317, along the lines you proposed: setup_args() resolves the pair through Catalog.resolve() first and keeps the old value when it cannot, so an unknown name is still setup's to report.

Verified by reverting the change: pytest tests/terminal/test_launch.py -q is 6 failed, 109 passed, 1 skipped without it (the sixth is the new case, failing with AssertionError: 'iq3_xxs' != 'IQ3_XXS') and 5 failed, 110 passed, 1 skipped with it. The remaining five fail on this Windows checkout without the change too.

The new cases cover iq3_xxs → IQ3_XXS, coder/iq1_m → IQ1_M, gyro/gyro-s → Gyro-S, an already-correct IQ3_S, and an unknown
ot-a-model that still reaches setup unchanged.

Not run: a real preset start on Windows like yours, which needs an installed model and a card this checkout can drive. The report already shows that failure; I did not repeat it end to end.

<!-- gh-comment-id:6443663419 --> @XiaoBinGan commented on GitHub (Oct 27, 2026): A fix for this is in #4317, along the lines you proposed: setup_args() resolves the pair through Catalog.resolve() first and keeps the old value when it cannot, so an unknown name is still setup's to report. Verified by reverting the change: pytest tests/terminal/test_launch.py -q is **6 failed, 109 passed, 1 skipped** without it (the sixth is the new case, failing with AssertionError: 'iq3_xxs' != 'IQ3_XXS') and **5 failed, 110 passed, 1 skipped** with it. The remaining five fail on this Windows checkout without the change too. The new cases cover iq3_xxs → IQ3_XXS, coder/iq1_m → IQ1_M, gyro/gyro-s → Gyro-S, an already-correct IQ3_S, and an unknown ot-a-model that still reaches setup unchanged. Not run: a real preset start on Windows like yours, which needs an installed model and a card this checkout can drive. The report already shows that failure; I did not repeat it end to end.
Author
Owner

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

Thank you for the report and the pointer to the two lines, and thanks to XiaoBinGan for PR #4317. Fixed on our side; the fix ships in the next update (0.2.8). strata launch now resolves the saved model name through the same catalog lookup as the command line, so iq3_xxs reaches setup as IQ3_XXS. An unknown name still goes to setup unchanged, so setup reports it in its own words. The commit keeps the contributor's authorship.

<!-- gh-comment-id:6492052153 --> @Niko1221 commented on GitHub (Oct 29, 2026): Thank you for the report and the pointer to the two lines, and thanks to XiaoBinGan for PR #4317. Fixed on our side; the fix ships in the next update (0.2.8). `strata launch` now resolves the saved model name through the same catalog lookup as the command line, so `iq3_xxs` reaches setup as `IQ3_XXS`. An unknown name still goes to setup unchanged, so setup reports it in its own words. The commit keeps the contributor's authorship.
Author
Owner

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

Thanks for the report and the pointer to the two lines, and thanks to XiaoBinGan for PR #4317. This is in 0.2.8: a saved model tag such as iq3_xxs now reaches setup as IQ3_XXS, with the contributor kept as the author. Run strata update.

<!-- gh-comment-id:6510334555 --> @Niko1221 commented on GitHub (Oct 29, 2026): Thanks for the report and the pointer to the two lines, and thanks to XiaoBinGan for PR #4317. This is in 0.2.8: a saved model tag such as `iq3_xxs` now reaches setup as `IQ3_XXS`, with the contributor kept as the author. Run `strata update`.
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#1850
No description provided.