From 70b1fe92cdeedb15d80853cfda614fb5a2c6ba11 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Fri, 12 Jun 2026 13:25:46 +0000 Subject: [PATCH 1/2] Attach DiffusionGemma visual-server from the prebuilt bundle The prebuilt bundles ship llama-diffusion-gemma-visual-server, but runtime_patterns_for_choice pruned it, so a fresh install never placed it next to llama-server. ensure_diffusion_visual_server then found no standalone release asset and skipped it, leaving Studio unable to serve DiffusionGemma GGUFs natively (it required DG_VISUAL_BIN or a source build). Keep the binary in the runtime allowlist on Linux, macOS and Windows so it lands in build/bin and is activated automatically. --- studio/install_llama_prebuilt.py | 12 +++++++----- tests/studio/install/test_rocm_support.py | 13 +++++++++++++ 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/studio/install_llama_prebuilt.py b/studio/install_llama_prebuilt.py index 92d1f84b2d..b8e1cfe9c0 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,9 @@ 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 +4789,7 @@ 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 From 24931d455c537b75943fcde478372ef68b2e0a03 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 12 Jun 2026 13:26:31 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- studio/install_llama_prebuilt.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/studio/install_llama_prebuilt.py b/studio/install_llama_prebuilt.py index b8e1cfe9c0..5473491bde 100644 --- a/studio/install_llama_prebuilt.py +++ b/studio/install_llama_prebuilt.py @@ -4781,7 +4781,12 @@ def runtime_patterns_for_choice(choice: AssetChoice) -> list[str]: }: 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", "llama-diffusion-gemma-visual-server", "lib*.dylib"] + return [ + "llama-server", + "llama-quantize", + "llama-diffusion-gemma-visual-server", + "lib*.dylib", + ] if choice.install_kind in { "windows-cpu", "windows-cuda", @@ -4789,7 +4794,12 @@ def runtime_patterns_for_choice(choice: AssetChoice) -> list[str]: "windows-rocm", "windows-arm64", }: - return ["llama-server.exe", "llama-quantize.exe", "llama-diffusion-gemma-visual-server.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}")