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++

launch: a Mac's setup gets only the options it knows

Niko12217c2f87805133
diff --git a/strata_cli/launch/runner.py b/strata_cli/launch/runner.py
index ea106453f..6a427ac6f 100644
--- a/strata_cli/launch/runner.py
+++ b/strata_cli/launch/runner.py
@@ -321,6 +321,19 @@ class Runner:
args += ["--gguf-dir", str(p if p.is_dir() else p.parent)]
if s.gpus:
args += ["--gpus", ",".join(str(g) for g in s.gpus)] if len(s.gpus) > 1 else ["--gpu", str(s.gpus[0])]
+ if sys.platform == "darwin":
+ # a Mac's setup is metal/setup_mac.py, which takes fewer options (no --kv, --gpu, speed projection)
+ keep = {"--yes", "--no-start", "--family", "--model", "--context", "--vision", "--data-dir", "--gguf-dir"}
+ out, i = [], 0
+ while i < len(args):
+ if args[i] in keep:
+ out.append(args[i])
+ if args[i] not in ("--yes", "--no-start") and i + 1 < len(args):
+ out.append(args[i + 1])
+ i += 2 if args[i] not in ("--yes", "--no-start") else 1
+ else:
+ i += 2 if i + 1 < len(args) and not args[i + 1].startswith("--") else 1
+ args = out
return args
def installed_state(self) -> tuple[Path | None, dict | None]:
diff --git a/tests/terminal/test_launch.py b/tests/terminal/test_launch.py
index 05d036ebf..1fa649f75 100644
--- a/tests/terminal/test_launch.py
+++ b/tests/terminal/test_launch.py
@@ -4,6 +4,8 @@ from __future__ import annotations
import json
import os
+import shutil
+import sys
import unittest
from pathlib import Path
from unittest import mock
@@ -269,6 +271,30 @@ class RunConfig(unittest.TestCase):
self.assertEqual(tune_words({"outcome": "cancelled"})[0], "stopped")
+class SetupArgs(unittest.TestCase):
+ def runner(self, **kw):
+ with Home():
+ cat = catalog(HW_12)
+ s = S.LaunchSettings(family="qwen", model="IQ3_XXS", context=32768, kv="q4_0", **kw)
+ return Runner(s, catalog=cat).setup_args()
+
+ def test_the_apps_own_installer_arguments(self):
+ import tempfile
+ own = tempfile.mkdtemp()
+ self.addCleanup(shutil.rmtree, own, True)
+ a = self.runner(data_dir="/d", model_path=own, gpus=[1])
+ self.assertEqual(a[:8], ["--yes", "--no-start", "--family", "qwen", "--model", "IQ3_XXS", "--context", "32768"])
+ for pair in (["--vision", "no"], ["--kv", "q4_0"], ["--experimental-speed-projection", "off"], ["--data-dir", "/d"], ["--gguf-dir", own],
+ ["--gpu", "1"]):
+ self.assertIn(pair[0], a)
+ self.assertEqual(a[a.index(pair[0]) + 1], pair[1])
+
+ def test_a_mac_gets_only_the_options_its_setup_knows(self):
+ with mock.patch.object(sys, "platform", "darwin"):
+ a = self.runner(data_dir="/d", gpus=[0])
+ self.assertEqual(a, ["--yes", "--no-start", "--family", "qwen", "--model", "IQ3_XXS", "--context", "32768", "--vision", "no", "--data-dir", "/d"])
+
+
class AdoptRules(unittest.TestCase):
def files(self, root: Path, shards=2, pack=True, tokenizer=True, mtp=True):
d = root / "Strata-data"