mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #198] --data-dir cannot migrate an existing install whose files are in a nested Strata-data folder — it silently re-downloads everything #101
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#101
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 @zackstantz on GitHub (Sep 30, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/198
--data-dircannot migrate an existing install whose files are in a nestedStrata-datafolder — it silently re-downloads everythingRelated: #162, #135 — same family, but this is a distinct blind spot that neither answer covers.
Symptom
I deleted my old Strata folder, unzipped a fresh copy into a new location, and ran setup with a new data folder. Instead of moving my existing ~84 GB of model files, setup started the full download again, and the data folder kept resolving back to the old location.
This happens on every retry:
--data-dir <new>never finds the files, so the download always restarts.Environment
setup.pyfrommain(engine 0.1.27)C:\Strata\Strata-mainC:\Users\<user>\Downloads\Strata-main\Strata-data\models\IQ3_S\(the pre-0.1.16 layout, whereStrata-datasits inside an older Strata folder)--data-dir C:\Strata\Strata-dataRoot cause
Two independent reasons the migration loop cannot see the files.
1.
has_data()only looks one level down (setup.py:1145):It checks
<candidate>/models, not<candidate>/Strata-data/models.2. The migration loop never considers the remembered data dir as a source (setup.py:1246):
settings["data_dir"]is used only to compute the destination (setup.py:1239). It is never iterated as a source, even though it points directly at the model files.So for the pre-0.1.16 layout the candidate folder is
...\Downloads\Strata-main, whose direct children aremodels/packs/mtponly via the nestedStrata-data\—has_data()returnsFalse, the folder is skipped, nothing is moved, and setup falls through to a fresh download.The case that the code does handle (files directly at
<old Strata folder>\models, as in #135) works fine, which is why this one slipped through.Steps to reproduce
...\Strata-main\Strata-data\models\IQ3_S\*(both shards complete).Strata-datawhere it is (or restore it), then unzip a fresh copy elsewhere.START-HERE.bat --setup --data-dir <new path>(same drive as the existing files).Expected
The existing model files are moved to
<new path>(a same-drive rename, instant) and setup proceeds without downloading.Actual
The files are not found. Setup announces a full model download. The data folder continues to resolve to the old location because
%APPDATA%\Strata\settings.jsonstill holds it.Workaround
Move the files by hand first, so the destination already contains them, then rerun setup.
have_modelthen short-circuits the download:Suggested fix
In
data_folder(), treatsettings["data_dir"]as a migration source, and/or lethas_data()recognise<folder>\Strata-dataas well as<folder>:with
has_data()checking bothfolder / dandfolder / "Strata-data" / d. This would also cover the "setup recognises already-downloaded files on another drive" improvement mentioned in #135.@Niko1221 commented on GitHub (Sep 30, 2026):
Confirmed, thanks for the analysis. In 0.1.28 (in testing)
--data-diralso moves the files of the data folder used before, and of aStrata-datafolder nested one level down.@Niko1221 commented on GitHub (Sep 30, 2026):
Fixed in 0.1.28:
--data-diralso moves the files of the previous data folder and of a nestedStrata-datafolder. Thanks @zackstantz for the analysis!