mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3996] [TUI] launch looks for models/<lower-case tag> while setup.py wrote models/IQ3_S: on a case-sensitive disk a downloaded model shows as "not on this computer" #1717
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#1717
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @TeemuSailynoja on GitHub (Oct 24, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3996
Problem
strata launchlooks for a model in<data>/models/<lower-cased tag>(models/iq3_s), whilesetup.pywrites that folder with the model name's case kept (models/IQ3_S). On a case-sensitive filesystem (Linux) the lookup misses a model that is already fully downloaded, so launch reports the model as not being on this computer and offers the whole download again.The data is never at risk — if the launch goes ahead,
setup.pyfinds its own.donemarks inmodels/IQ3_Sand downloads nothing — but the plan, the screens and the confirm dialog all say the model must be downloaded, and a person who answers "Not now" is blocked for no reason.Environment
dfa3f40), installed byinstall.shIQ3_S(Qwen3.8-Flash-Next-GSQ-RCO-IQ3_S, 2 shards, 83.6 GB) already on disk from an earlier install, with its.donemarks, the picture reader and the prepared draft layer. No run config yet (fresh Terminal install), so this is the "not installed yet" path.Reproduce
Expected: the model is recognised as already on disk.
Actual:
About 83.6 GB to download: the model (83.6 GB).Same files, only the letter case of the folder changed (
ln -s .../IQ3_S /tmp/dd/models/iq3_s):Without
--data-dirthe same thing happens on the real data folder:strata launch --model IQ3_S --plansays 83.6 GB while the shards and their.donemarks are inStrata-data/models/IQ3_S.Root cause
strata_cli/launch/catalog.py:376-378—tag_of()returns(families[family].get("tag", "") + model).lower(), i.e. the run-config tagiq3_s.strata_cli/launch/modelstate.py:159— the on-disk scan uses it as a folder name:folder = base / "models" / catalog.tag_of(family, model), so a downloadedmodels/IQ3_Scounts as 0 GB andPart("weights", …, total)becomes the full download.setup.py:8281/setup.py:8314— setup names the folder with the case kept:tag = fam["tag"] + model("IQ3_S"),models_dir = models_root / tag. The.donemarks (setup.py:928-930, used at8319-8330) are keyed to that same path, which is why setup itself correctly skips the download.setup.py:7662,8083,8355usetag.lower()→packs/iq3_s. That is why the two names disagree in one data folder (models/IQ3_S+packs/iq3_s).strata_cli/launch/runner.py:912(progress_job) uses the lower-case tag as its fallback folder too, so the progress figure can count a folder that does not exist whenexpected_filesis unavailable.On Windows and macOS the two names resolve to the same folder, so this only shows on a case-sensitive filesystem.
Why renaming the folder is not a fix
Renaming
models/IQ3_Stomodels/iq3_smakes launch happy but breaks setup's own check (setup.py:8314looks formodels/IQ3_S):missingbecomes non-empty,models_dir.mkdir()recreatesmodels/IQ3_Sand the 83.6 GB are really downloaded a second time. The launch-side lookup has to follow setup's naming, not the other way round.Suggested fix
A folder lookup that tries the exact tag first and then matches the tag case-insensitively among the entries of
models/, used bymodelstate.assessand byrunner.py's progress fallback.tests/terminal/test_launch.pyalready builds amodels/IQ3_XXSfolder in itsAdoptRules.files()fixture, so a regression test on a case-sensitive runner is cheap; nothing intests/terminalcovers themodelstate.assesson-disk scan today.Workarounds that work today
strata launch --model-path /path/to/Strata-data/models/IQ3_S …— the files are used where they are and setup writes the run config, after which the folder name no longer matters (the config names the files by absolute path).ln -s IQ3_S models/iq3_s— both names then resolve to the same files, so launch and setup agree.Reproduction status
Reproduced locally on the unpatched Terminal 0.2.4.2 bundle (both
--planruns above, and the same comparison throughmodelstate.assessdirectly). The folder lookup is unchanged onmain(7dd5cf18), so the current release and the next one behave the same way.@XiaoBinGan commented on GitHub (Oct 27, 2026):
A fix for this is in #4315: the model folder is resolved with a case-insensitive match when the exact name is absent, while the exact path still wins first, so a folder strata launch itself wrote in lower case resolves as before.
Verified on a case-sensitive filesystem (the Windows checkout cannot show it: NTFS matches models/iq3_s to models/IQ3_S). A script loads strata_cli/launch/modelstate.py with its two imported constants stubbed, builds models/IQ3_S with one 4,096-byte shard and asks the module's own resolver:
Not run: the full strata launch --plan flow on a btrfs install as in your report. The resolver and the byte count are the same code path, but I did not repeat your end-to-end run.
@XiaoBinGan commented on GitHub (Oct 27, 2026):
This is fixed in 0.2.7, which I missed when I posted the link to my pull request: Catalog.model_folder() now resolves the folder by trying setup's own spelling first and then a case-insensitive match, and its docstring names this issue. modelstate.assess() calls it, so the plan, the screens and the confirm dialog find a models/IQ3_S folder from the iq3_s tag.
I closed my #4315 as superseded — no need to review it.
For the record, the before-state I verified on a case-sensitive filesystem (Linux, 2026-10-27, the module loaded directly against a models/IQ3_S fixture): the lower-case path did not exist, glob("*.gguf") found nothing, and on_disk_gb was 0.0. That is what 0.2.7 changed.
@Niko1221 commented on GitHub (Oct 27, 2026):
Thank you, exactly right. Fixed in 0.2.7: Launch finds the model folder whatever the letter case, so a model already on disk is not offered for download again.
Release: https://github.com/Niko1221/Strata/releases/tag/v0.2.7