Skip to content

Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.

C++

setup: --gguf-dir files for Qwen3.6 no longer need a .done mark made by setup (#3606)

Günter560cc9fbbc42
diff --git a/setup.py b/setup.py
index ab6dad1b2..d72ba3e3e 100644
--- a/setup.py
+++ b/setup.py
@@ -7757,7 +7757,9 @@ def install_own_path(a, family, gpu, hip, amd, cuda_tk, multi, port, ram, adopte
gguf = folder / fam["file"].format(q=model)
size = fam["sha256"][gguf.name][0]
part = gguf.with_name(gguf.name + ".part")
- left = 0 if gguf.exists() and done(gguf) else (size - (part.stat().st_size if part.is_file() else 0)) / 1e9
+ def have(p: Path) -> bool: # --gguf-dir: the person's own file has no finish mark; verify_sha256 checks and writes it
+ return p.exists() and (done(p) or bool(a.gguf_dir))
+ left = 0 if have(gguf) else (size - (part.stat().st_size if part.is_file() else 0)) / 1e9
if left and free_gb(folder) < left:
fail(f"not enough free disk space in {folder}: need ~{left:.0f} GB, {free_gb(folder):.0f} GB free", ("use --data-dir on a bigger drive (strata launch --data-dir)" if CONTROL else "use --models-dir on a bigger drive"))
if left and free_gb(folder) < left + 1:
@@ -7781,7 +7783,7 @@ def install_own_path(a, family, gpu, hip, amd, cuda_tk, multi, port, ram, adopte
ok("engine: the engine component (looked up when the model loads)" if CONTROL else f"engine: {eng / EXE}")
step(5, f"downloading {fam['title']} {model}")
- if gguf.exists() and done(gguf):
+ if have(gguf):
ok(f"{gguf.name} already downloaded")
else:
if a.gguf_dir:
@@ -7791,7 +7793,7 @@ def install_own_path(a, family, gpu, hip, amd, cuda_tk, multi, port, ram, adopte
ok(f"model file: {gguf}")
mmproj = folder / fam["mmproj"]
if vision != "none": # the image encoder: Unsloth's mmproj, pinned, size + SHA-256 checked
- if mmproj.exists() and done(mmproj):
+ if have(mmproj):
ok(f"{mmproj.name} already downloaded")
else:
if a.gguf_dir:
diff --git a/tools/test_setup_qwen36.py b/tools/test_setup_qwen36.py
index 0baef2e9a..b71cab233 100644
--- a/tools/test_setup_qwen36.py
+++ b/tools/test_setup_qwen36.py
@@ -151,6 +151,25 @@ class InstallOwnPath(unittest.TestCase):
self.assertEqual(Path(self.cfg["exe"]).parent, self.root / "engine")
self.assertIn(("config", "strata-qwen36-ud-q4_k_xl.json"), self.calls)
+ def test_gguf_dir_takes_the_persons_own_files_that_have_no_finish_mark(self):
+ folder = self.root / "own"
+ folder.mkdir()
+ for name in ("Qwen3.6-35B-A3B-UD-Q4_K_XL.gguf", "mmproj-F16.gguf"):
+ (folder / name).write_text("x") # no <name>.done: verify_sha256 checks the file and marks it
+ with mock.patch.object(setup, "free_gb", lambda p: 1.0): # nothing to download: no disk needed
+ rc, out = self.install(model="UD-Q4_K_XL", vision="cpu", gguf_dir=str(folder))
+ self.assertEqual(rc, 0, out)
+ self.assertEqual([c for c in self.calls if c[0] == "get"], [])
+ self.assertIn(("sha", "Qwen3.6-35B-A3B-UD-Q4_K_XL.gguf"), self.calls)
+ self.assertIn(("sha", "mmproj-F16.gguf"), self.calls)
+
+ def test_gguf_dir_without_the_file_still_says_it_is_missing(self):
+ folder = self.root / "empty"
+ folder.mkdir()
+ rc, out = self.install(model="UD-Q4_K_XL", vision="no", gguf_dir=str(folder))
+ self.assertEqual(rc, 1)
+ self.assertIn("is missing", out)
+
def test_default_size_follows_the_ram(self):
rc, out = self.install(ram=64.0)
self.assertEqual(rc, 0, out)