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++
serve: a config with a vision section but no --vision in its args starts the engine with images (#1322)
Niko1221311c9839642e
diff --git a/serve/server.py b/serve/server.pyindex 1ec6179ea..6ea3b79d8 100644--- a/serve/server.py+++ b/serve/server.py@@ -2106,6 +2106,18 @@ def engine_args(cfg: dict) -> list[str]:config: "auto" by default, or the first layer of each later GPU's share, e.g. "18" or "16,32"; seelayer_split_value)."""args = list(cfg["args"])+ # #1322: a config with a "vision" section but without --vision in its args (written by an older setup run, or edited by+ # hand) advertised images and then refused every picture ("this engine was started without --vision"). The section+ # says images are wanted: start the engine with them, and keep the encoder's VRAM free as setup does for a GPU encoder+ # (only when the config has no reserve of its own).+ if isinstance(cfg.get("vision"), dict) and "--vision" not in args:+ args.append("--vision")+ note = "added --vision"+ if cfg["vision"].get("gpu") and "--vram-reserve-mib" not in args:+ args += ["--vram-reserve-mib", "700"]+ note += " and --vram-reserve-mib 700"+ print(f'[strata] the config has a "vision" section but no --vision in its args: {note} (run setup again with '+ "--vision to write them)", flush=True)if layer_split_of(cfg) and "--layer-split" not in args:args += ["--layer-split", layer_split_value(cfg)]# opt-in: an auto split runs on the first card alone when it holds every profiled expert and the KVdiff --git a/serve/test_server.py b/serve/test_server.pyindex a7f976ecb..fd7020508 100644--- a/serve/test_server.py+++ b/serve/test_server.py@@ -1898,6 +1898,18 @@ class PeerDevice(unittest.TestCase):"""#665: several GPUs in the config are a layer split, but --peer-device uses the second card as an expert-cachetier, and the engine refuses it beside --layer-split: the server must not add one then."""+ def test_a_vision_section_starts_the_engine_with_images_1322(self):+ args = ["--native", "x"]+ got = engine_args({"args": list(args), "vision": {"exe": "v", "gpu": True}})+ self.assertEqual(got, args + ["--vision", "--vram-reserve-mib", "700"])+ got = engine_args({"args": list(args), "vision": {"exe": "v", "gpu": False}})+ self.assertEqual(got, args + ["--vision"])+ mine = args + ["--vram-reserve-mib", "1500"]+ self.assertEqual(engine_args({"args": list(mine), "vision": {"gpu": True}}), mine + ["--vision"])+ done = args + ["--vision", "--vram-reserve-mib", "700"] # setup wrote it: unchanged+ self.assertEqual(engine_args({"args": list(done), "vision": {"gpu": True}}), done)+ self.assertEqual(engine_args({"args": list(args)}), args) # no section: no images+def test_split_added_for_several_gpus(self):self.assertEqual(engine_args({"args": ["--native", "x"], "gpu": [0, 1]}),["--native", "x", "--layer-split", "auto"])