Compare commits

...
Sign in to create a new pull request.

2 commits

Author SHA1 Message Date
pre-commit-ci[bot]
24931d455c [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2026-06-12 13:26:35 +00:00
Daniel Han
70b1fe92cd 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.
2026-06-12 13:25:46 +00:00
2 changed files with 30 additions and 5 deletions

View file

@ -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<binary>-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}")

View file

@ -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