Skip to content

Commit 738a20d

Browse files
committed
Add native model manager option to audio build configuration
- Introduced `native_model_manager` option in `audio_build_options.py` to enable WebUI downloads and UI management. - Updated `AudioCppBuildConfig` and `AudioCppManager` to handle the new configuration option in CMake arguments. - Modified tests to validate the inclusion of `native_model_manager` in build options and CMake argument generation. - Updated frontend configuration to reflect the new build option for consistency across the application.
1 parent 8bf5f38 commit 738a20d

5 files changed

Lines changed: 6 additions & 1 deletion

File tree

backend/audio_build_options.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ def _i(
134134
_b("build_examples", "build_examples", False, "Examples", "ENGINE_BUILD_EXAMPLES", "artifacts", "ENGINE_BUILD_EXAMPLES"),
135135
_b("build_warmbench", "build_warmbench", False, "Warmbench", "ENGINE_BUILD_WARMBENCH", "artifacts", "ENGINE_BUILD_WARMBENCH"),
136136
_b("deployment_build", "deployment_build", False, "Deployment build", "AUDIOCPP_DEPLOYMENT_BUILD — embed model specs in binaries", "artifacts", "AUDIOCPP_DEPLOYMENT_BUILD"),
137+
_b("native_model_manager", "native_model_manager", True, "Native model manager", "AUDIOCPP_BUILD_NATIVE_MODEL_MANAGER — WebUI downloads and --ui-management", "artifacts", "AUDIOCPP_BUILD_NATIVE_MODEL_MANAGER"),
137138

138139
# CPU
139140
_b("native_cpu", "native_cpu", True, "Native CPU", "ENGINE_ENABLE_NATIVE_CPU — -march=native", "cpu", "ENGINE_ENABLE_NATIVE_CPU"),

backend/audio_cpp_manager.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ class AudioCppBuildConfig:
4848
build_examples: bool = False
4949
build_warmbench: bool = False
5050
deployment_build: bool = False
51+
native_model_manager: bool = True
5152
model_set: str = "full"
5253
models: str = ""
5354
jobs: int = 0
@@ -357,6 +358,7 @@ def _cmake_args(
357358
f"-DENGINE_ENABLE_METAL={'ON' if config.metal else 'OFF'}",
358359
f"-DENGINE_ENABLE_CUDA_GRAPHS={'ON' if config.cuda_graphs else 'OFF'}",
359360
f"-DAUDIOCPP_DEPLOYMENT_BUILD={'ON' if config.deployment_build else 'OFF'}",
361+
f"-DAUDIOCPP_BUILD_NATIVE_MODEL_MANAGER={'ON' if config.native_model_manager else 'OFF'}",
360362
f"-DAUDIOCPP_MODEL_SET={config.model_set or 'full'}",
361363
]
362364
if (config.model_set or "") == "custom" and str(config.models or "").strip():

backend/tests/test_audio_build_options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def test_catalog_exposes_backends_and_iqk_style_sections():
1414
assert "backends" in ids
1515
assert "models" in ids
1616
keys = {o["key"] for c in cat["categories"] for o in c["options"]}
17-
for expected in ("cuda", "hip", "vulkan", "metal", "llamafile", "deployment_build", "model_set"):
17+
for expected in ("cuda", "hip", "vulkan", "metal", "llamafile", "deployment_build", "native_model_manager", "model_set"):
1818
assert expected in keys
1919

2020

backend/tests/test_audio_cpp_manager.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def test_cmake_plan_selects_one_backend_and_both_runtime_targets(tmp_path, monke
4040
assert "-DENGINE_BUILD_TESTS=OFF" in args
4141
assert "-DENGINE_ENABLE_LLAMAFILE=ON" in args
4242
assert "-DAUDIOCPP_MODEL_SET=full" in args
43+
assert "-DAUDIOCPP_BUILD_NATIVE_MODEL_MANAGER=ON" in args
4344
assert args[-2:] == ["-G", "Ninja"]
4445
assert config.cuda is True
4546
assert config.backend == "cuda"

frontend/src/views/EnginesView.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2322,6 +2322,7 @@ const AUDIO_FALLBACK_DEFAULTS = {
23222322
build_examples: false,
23232323
build_warmbench: false,
23242324
deployment_build: false,
2325+
native_model_manager: true,
23252326
model_set: 'full',
23262327
models: '',
23272328
jobs: 0,

0 commit comments

Comments
 (0)