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: Pictures on means the CPU picture reader on an AMD card, and a plain warning when pictures stay off

Niko122147e2343b1b5a
diff --git a/strata_cli/launch/runner.py b/strata_cli/launch/runner.py
index 428c031eb..256a41195 100644
--- a/strata_cli/launch/runner.py
+++ b/strata_cli/launch/runner.py
@@ -301,6 +301,37 @@ class Runner:
self.emit("engine", "The engine is installed.", 100)
# ---- 2. the model
+ def vision_word(self) -> str:
+ """What setup is told for the picture choice. "on" means "as well as this computer can": an AMD card has no GPU picture reader yet, and setup
+ would then switch pictures off without being asked; the CPU reader works there, so that is what "on" means on AMD."""
+ s = self.s
+ if s.vision == "off":
+ return "no"
+ if s.vision == "on":
+ try:
+ from strata_control import engine_component
+ if engine_component.detect_backend()[0] == "hip":
+ return "cpu"
+ except Exception: # noqa: BLE001
+ pass
+ return "yes"
+ return s.vision
+
+ def check_pictures(self, path: Path) -> None:
+ """Pictures were asked for: say so in plain words when the installed settings still have them off."""
+ s = self.s
+ if s.vision == "off":
+ return
+ try:
+ desc = self.catalog.strata.describe_config(path)
+ except Exception: # noqa: BLE001
+ return
+ if (desc or {}).get("images") in (None, "off"):
+ note = ("Pictures could not be switched on for this model and graphics card, so it will answer text only. "
+ "Pick another model or a card the picture reader supports if you need them.")
+ self.notices.append(note)
+ self.emit("model", note, 100, level="warn")
+
def setup_args(self) -> list[str]:
cat, s = self.catalog, self.s
fam, model = s.family, s.model
@@ -308,7 +339,7 @@ class Runner:
ctx = s.context
if ctx:
args += ["--context", str(ctx)]
- args += ["--vision", {"off": "no", "on": "yes"}.get(s.vision, s.vision)]
+ args += ["--vision", self.vision_word()]
if s.kv:
args += ["--kv", s.kv]
if fam in ("qwen", "coder"):
@@ -423,6 +454,7 @@ class Runner:
raise LaunchError("Setup finished but no run config was written for this model.",
"Run `strata launch` again; if it repeats, the setup output above says why.", 6)
self.emit("model", f"{title} is ready.", 100)
+ self.check_pictures(path)
return path
def adopt_prepared_files(self, setup_error: str) -> Path | None:
diff --git a/tests/terminal/test_launch.py b/tests/terminal/test_launch.py
index adf390fda..607031da8 100644
--- a/tests/terminal/test_launch.py
+++ b/tests/terminal/test_launch.py
@@ -389,6 +389,29 @@ class AdoptRules(unittest.TestCase):
family_def={}, log=h.base / "x.log", backend=None)
self.assertIn("only for the Qwen3.8-Flash-Next", problems[0])
+ def test_pictures_on_means_the_cpu_reader_on_an_amd_card(self):
+ with Home() as h:
+ cat = catalog(HW_12)
+ for vision, backend, want in (("on", "hip", "cpu"), ("on", "cuda", "yes"), ("off", "hip", "no"), ("gpu", "hip", "gpu"), ("cpu", "cuda", "cpu")):
+ r = Runner(S.LaunchSettings(family="qwen", model="IQ3_XXS", vision=vision), catalog=cat)
+ with mock.patch("strata_control.engine_component.detect_backend", return_value=(backend, None)):
+ self.assertEqual(r.vision_word(), want, (vision, backend))
+
+ def test_pictures_asked_but_still_off_is_said_in_plain_words(self):
+ with Home() as h:
+ cat = catalog(HW_12)
+ seen = []
+ r = Runner(S.LaunchSettings(family="qwen", model="IQ3_XXS", vision="on"), catalog=cat, emit=seen.append)
+ path = h.base / "cfg.json"
+ path.write_text("{}")
+ with mock.patch.object(cat.strata, "describe_config", return_value={"images": "off"}):
+ r.check_pictures(path)
+ self.assertTrue(any("Pictures could not be switched on" in e.text and e.level == "warn" for e in seen))
+ seen.clear()
+ with mock.patch.object(cat.strata, "describe_config", return_value={"images": "cpu"}):
+ r.check_pictures(path)
+ self.assertEqual(seen, [])
+
def test_runner_adopts_when_setup_cannot_handle_the_card(self):
with Home() as h:
d, m = self.files(h.base)