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 goes through setup's Control mode (setup keeps the choice when the engine component carries strata-vision); the screen warns only when the installed engine lacks the reader

Niko12218d65058c9f90
diff --git a/setup.py b/setup.py
index 42d94b860..8a08fbfa6 100644
--- a/setup.py
+++ b/setup.py
@@ -5773,7 +5773,10 @@ def control_engine_step(gpu, vision):
warn(f"no engine is installed for this PC yet ({e}). The model is downloaded and prepared now; install the engine "
"component for your GPU (a later step of the app, or the Terminal) before loading it")
if vision != "none":
- warn("images are not part of the app's first release: images off for this model")
+ if (eng / VEXE).is_file():
+ ok(f"image encoder: {eng / VEXE} (carried by the engine component)")
+ return llama, eng, meta, [], gpu, vision
+ warn("this engine component has no image encoder (strata-vision): images off for this model")
return llama, eng, meta, [], gpu, "none"
diff --git a/strata_cli/launch/runner.py b/strata_cli/launch/runner.py
index 256a41195..8cf0198be 100644
--- a/strata_cli/launch/runner.py
+++ b/strata_cli/launch/runner.py
@@ -302,20 +302,12 @@ class Runner:
# ---- 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."""
+ """What setup is told for the picture choice. "on" is setup's "yes": setup (Control mode) picks the CPU encoder on a card under 24 GB
+ and on AMD, the GPU encoder on a bigger NVIDIA card, and downloads the pinned picture-reader file (mmproj) with the model."""
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
+ return "yes" if s.vision == "on" else 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."""
@@ -327,8 +319,8 @@ class Runner:
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.")
+ note = ("Pictures could not be switched on: this engine does not carry the picture reader, or this model cannot read pictures, "
+ "so it will answer text only.")
self.notices.append(note)
self.emit("model", note, 100, level="warn")
diff --git a/strata_cli/launch/screens.py b/strata_cli/launch/screens.py
index 81c0e9451..ef87b029c 100644
--- a/strata_cli/launch/screens.py
+++ b/strata_cli/launch/screens.py
@@ -766,13 +766,22 @@ class PicturesScreen(Base):
s = self.ctx.settings
return next((x for x in self.ctx.rows if (x.family, x.model) == (s.family, s.model)), None)
+ def reader(self) -> str:
+ """"present" when the installed engine carries the picture reader (strata-vision), "missing" when an engine is installed without it,
+ "unknown" before any engine is installed (the first launch fetches it)."""
+ exe = self.ctx.engine_exe()
+ if not exe:
+ return "unknown"
+ folder = Path(str(exe)).parent
+ return "present" if any((folder / n).is_file() for n in ("strata-vision", "strata-vision.exe")) else "missing"
+
def on_mount(self) -> None:
s = self.ctx.settings
r = self.row()
self.supported = True if r is None else r.images
items = [Item(["No pictures"], key="off")]
if self.supported:
- items.append(Item(["Yes, read pictures" + ("" if S.TERMINAL_SETS_UP_PICTURES else " (this Terminal cannot set it up yet)")], key="on"))
+ items.append(Item(["Yes, read pictures" + (" (this engine has no picture reader)" if self.reader() == "missing" else "")], key="on"))
else:
items.append(Item([Cell("Yes, read pictures: not available for this model yet", MUTE)], key="on", enabled=False))
sel = 1 if s.vision != "off" and self.supported else 0
@@ -787,9 +796,10 @@ class PicturesScreen(Base):
if not self.supported:
return Text("This model cannot read pictures yet, so pictures stay off. Pick another model if you need them.", style=WARN)
out = Text("Pictures add " + extra + " Say No if you only chat in text.", style=MUTE)
- if not S.TERMINAL_SETS_UP_PICTURES:
- out.append("\nHeads up: the model installer in this Terminal does not set up the picture reader yet (it is not part of the first release), "
- "so the model will answer text only. Your choice is saved for when it does.", style=WARN)
+ if self.reader() == "missing":
+ out.append("\nHeads up: the engine installed here does not carry the picture reader, so the model would answer text only. "
+ "Update the engine, or say No.", style=WARN)
+ return out
return out
def commit(self) -> None:
diff --git a/strata_cli/launch/settings.py b/strata_cli/launch/settings.py
index d35fa6fdb..87f33e046 100644
--- a/strata_cli/launch/settings.py
+++ b/strata_cli/launch/settings.py
@@ -25,7 +25,6 @@ ACCESS_WORDS = {"local": "This computer only", "lan": "My local network", "cloud
"tailscale": "Tailscale"}
TUNE_MODES = ("quick", "thorough", "skip")
VISION_MODES = ("off", "on", "gpu", "cpu")
-TERMINAL_SETS_UP_PICTURES = False # setup.py in control mode says "images are not part of the app's first release": flip when it does
KV_MODES = ("int8", "q4_0", "k8v4", "fp16")
DEFAULT_PORT = 8080
diff --git a/tests/terminal/test_launch.py b/tests/terminal/test_launch.py
index 607031da8..b5ffedee6 100644
--- a/tests/terminal/test_launch.py
+++ b/tests/terminal/test_launch.py
@@ -389,13 +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):
+ def test_pictures_on_is_setups_yes_and_setup_picks_the_encoder(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")):
+ for vision, want in (("on", "yes"), ("off", "no"), ("gpu", "gpu"), ("cpu", "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))
+ self.assertEqual(r.vision_word(), want, vision)
+ argv = Runner(S.LaunchSettings(family="qwen", model="IQ3_XXS", vision="on"), catalog=cat).setup_args()
+ self.assertEqual(argv[argv.index("--vision") + 1], "yes")
+
+ def test_setup_control_mode_keeps_pictures_when_the_engine_carries_the_reader(self):
+ from types import SimpleNamespace
+ with Home() as h:
+ mod = catalog(HW_12).strata.setup_module()
+ if mod is None or not hasattr(mod, "control_engine_step"):
+ self.skipTest("no setup.py in this checkout")
+ engine = h.base / "engine"
+ engine.mkdir()
+ found = SimpleNamespace(root=engine, version="0.1.45", backend="cuda", platform="linux-x86_64")
+ with mock.patch.object(mod, "get_llama_cpp", return_value=engine), mock.patch("strata_control.engine_component.resolve", return_value=found):
+ self.assertEqual(mod.control_engine_step({}, "cpu")[5], "none") # no strata-vision beside the engine: off, with a note
+ (engine / mod.VEXE).write_text("x")
+ self.assertEqual(mod.control_engine_step({}, "cpu")[5], "cpu") # the component carries it: the choice is kept
+ self.assertEqual(mod.control_engine_step({}, "none")[5], "none")
def test_pictures_asked_but_still_off_is_said_in_plain_words(self):
with Home() as h: