diff --git a/strata_cli/launch/cmd.py b/strata_cli/launch/cmd.py index 3059012418..54ce948286 100644 --- a/strata_cli/launch/cmd.py +++ b/strata_cli/launch/cmd.py @@ -355,6 +355,14 @@ def apply_defaults(s: S.LaunchSettings, catalog) -> tuple[S.LaunchSettings, list else: notices.append(S.Notice("error", "No model fits this computer by Strata's rules, and none was chosen.", "Name one with --model (strata launch --help lists them); a bigger one will run slowly.")) + try: + from strata_control import engine_component as _ec + _b, _how = _ec.detect_backend() + if _how == "saved choice": + notices.append(S.Notice("warn", f"The engine for {_ec.MAKE_NAMES.get(_b, _b)} cards is used (your saved choice). " + "`strata launch --backend auto` goes back to the PC's own choice.", "")) + except Exception: # noqa: BLE001 + pass broken = _broken_nvidia_note(comp) if broken: notices.append(S.Notice("warn", broken, "")) diff --git a/strata_cli/launch/runner.py b/strata_cli/launch/runner.py index 67d4e46da4..a2cf6cb631 100644 --- a/strata_cli/launch/runner.py +++ b/strata_cli/launch/runner.py @@ -2029,6 +2029,9 @@ class Runner: # a ready-made pack (NVFP4) is taken from setup's own models folder, not from where the person's files are (round 8, N2: the plan # said "nothing to download" and setup then asked for 129 GB): count what setup will fetch parts = [p for p in parts if p["kind"] != "weights"] + [{"kind": "weights", "label": "the ready-made pack", "gb": gap["gb"]}] + intel = self.intel_chosen() + if intel: # the Intel route builds the pack from the files and fetches no draft layer, picture reader or drafter + parts = [p for p in parts if p["kind"] not in ("mtp", "mmproj", "dflash2")] gb = round(sum(p["gb"] for p in parts), 1) engine, here = True, [] if self.multi_file(): # DeepSeek does not use the Strata engine: nothing about it in the plan (its own package is in the placement) @@ -2069,6 +2072,9 @@ class Runner: "first. `strata components engine` says why.") elif not engine: text += " The engine for your graphics card is downloaded first (from the update source; its size is shown when it starts)." + if intel: + text += (" For the Intel card Strata builds the model's pack from your files itself (once, a few minutes); the first time it fetches " + "a small helper (llama.cpp's gguf-py) from GitHub. No draft layer or picture reader is used on Intel cards yet.") return {"gb": gb, "parts": parts, "engine_missing": not engine and not here, "engine_usable": engine, "own_files": st.own_files, "text": text} def ready_pack_gap(self) -> dict | None: diff --git a/tests/terminal/test_backend_choice.py b/tests/terminal/test_backend_choice.py index 3cf732a29d..f98d824607 100644 --- a/tests/terminal/test_backend_choice.py +++ b/tests/terminal/test_backend_choice.py @@ -79,5 +79,17 @@ class BrokenNvidia(unittest.TestCase): self.assertIsNone(cmd._broken_nvidia_note(comp), "the person already chose") +class SavedChoiceLine(unittest.TestCase): + def test_a_launch_after_a_saved_choice_says_so(self): + from strata_cli.launch import cmd, settings as S + from tests.terminal.launch_support import HW_12, Home, catalog + with Home(), mock.patch.object(ec, "detect_backend", lambda *a, **k: ("sycl", "saved choice")): + _s, notes = cmd.apply_defaults(S.LaunchSettings(family="qwen", model="IQ3_XXS"), catalog(HW_12)) + hit = [n for n in notes if "your saved choice" in n.text] + self.assertTrue(hit, [n.text for n in notes]) + self.assertIn("Intel cards", hit[0].text) + self.assertIn("--backend auto", hit[0].text) + + if __name__ == "__main__": unittest.main()