diff --git a/studio/install_llama_prebuilt.py b/studio/install_llama_prebuilt.py index 92d1f84b2d..5473491bde 100644 --- a/studio/install_llama_prebuilt.py +++ b/studio/install_llama_prebuilt.py @@ -4768,8 +4768,10 @@ def runtime_patterns_for_choice(choice: AssetChoice) -> list[str]: # repackage the SO/DLL set (e.g. ggml-org/llama.cpp#23462 split the # per-binary entry code into paired ``lib-impl.so`` shared # libraries between b9279 and b9283) without us re-enumerating - # every new file. Studio only invokes llama-server and llama-quantize; - # other CLIs upstream ships (llama-cli, llama-bench, ...) are skipped. + # every new file. Studio invokes llama-server, llama-quantize, and the + # DiffusionGemma visual-server (when the bundle ships it, for native + # DiffusionGemma serving); other CLIs upstream ships (llama-cli, + # llama-bench, ...) are skipped. if choice.install_kind in { "linux-cpu", "linux-cuda", @@ -4777,9 +4779,14 @@ def runtime_patterns_for_choice(choice: AssetChoice) -> list[str]: "linux-rocm", "linux-arm64", }: - return ["llama-server", "llama-quantize", "lib*.so*"] + return ["llama-server", "llama-quantize", "llama-diffusion-gemma-visual-server", "lib*.so*"] if choice.install_kind in {"macos-arm64", "macos-x64"}: - return ["llama-server", "llama-quantize", "lib*.dylib"] + return [ + "llama-server", + "llama-quantize", + "llama-diffusion-gemma-visual-server", + "lib*.dylib", + ] if choice.install_kind in { "windows-cpu", "windows-cuda", @@ -4787,7 +4794,12 @@ def runtime_patterns_for_choice(choice: AssetChoice) -> list[str]: "windows-rocm", "windows-arm64", }: - return ["llama-server.exe", "llama-quantize.exe", "*.dll"] + return [ + "llama-server.exe", + "llama-quantize.exe", + "llama-diffusion-gemma-visual-server.exe", + "*.dll", + ] raise PrebuiltFallback(f"unsupported install kind for runtime overlay: {choice.install_kind}") diff --git a/tests/studio/install/test_rocm_support.py b/tests/studio/install/test_rocm_support.py index 04463fb720..1a7de1af6d 100644 --- a/tests/studio/install/test_rocm_support.py +++ b/tests/studio/install/test_rocm_support.py @@ -393,6 +393,19 @@ class TestRuntimePatterns: patterns = runtime_patterns_for_choice(choice) assert "lib*.dylib" in patterns + def test_diffusion_visual_server_kept(self): + # The DiffusionGemma visual-server ships in the prebuilt bundle and must + # survive the prune so Studio can serve DiffusionGemma GGUFs natively. + for kind, name in ( + ("linux-cuda", "llama-diffusion-gemma-visual-server"), + ("macos-arm64", "llama-diffusion-gemma-visual-server"), + ("windows-cuda", "llama-diffusion-gemma-visual-server.exe"), + ): + choice = AssetChoice( + repo = "", tag = "", name = "", url = "", source_label = "", install_kind = kind + ) + assert name in runtime_patterns_for_choice(choice) + # TEST: install_llama_prebuilt.py -- HostInfo.has_rocm field