mirror of
https://github.com/mudler/LocalAI.git
synced 2026-09-25 15:44:56 -04:00
feat(audio-cpp): AUDIOCPP_DEFAULT_BACKEND fallback for models without a backend option (#12133)
Models whose options carry no explicit backend: open their session on the CPU backend even in accelerator images. The gallery entries carry backend:best since #11892; this covers hand-written model configurations the same way, per deployment: the environment variable supplies the fallback, an explicit backend: option always wins (merged beside the existing threads and maingpu fallbacks), and validation reuses the option parser. Assisted-by: Claude:claude-fable-5 Signed-off-by: Plamen K. Kosseff <p.kosseff@gmail.com>
This commit is contained in:
1 parent
2e279920b0
commit
e7306a087a
6 files changed
+39
-1
No files matched your search
@@ -42,6 +42,10 @@ static void test_defaults() {
|
||||
check(r.options.family.empty(), "family defaults to empty");
|
||||
check(r.options.task.empty(), "task defaults to empty");
|
||||
check(r.options.backend == "cpu", "backend defaults to cpu");
|
||||
// backend_set separates the "cpu" default from an explicit backend:cpu —
|
||||
// grpc-server merges the AUDIOCPP_DEFAULT_BACKEND fallback only when the
|
||||
// model's options chose nothing.
|
||||
check(!r.options.backend_set, "backend_set defaults to false");
|
||||
check(r.options.device == 0, "device defaults to 0");
|
||||
check(r.options.threads == 0, "threads defaults to 0");
|
||||
check(r.options.busy_timeout_ms == 0, "busy_timeout_ms defaults to 0");
|
||||
@@ -68,6 +72,7 @@ static void test_scalar_options() {
|
||||
check(r.options.family == "qwen3_tts", "family parsed");
|
||||
check(r.options.task == "tts", "task parsed");
|
||||
check(r.options.backend == "cuda", "backend parsed");
|
||||
check(r.options.backend_set, "backend_set records the explicit option");
|
||||
check(r.options.device == 1, "device parsed");
|
||||
check(r.options.threads == 8, "threads parsed");
|
||||
check(r.options.busy_timeout_ms == 30000, "busy_timeout_ms parsed");
|
||||
|
||||
Reference in new issue
Block a user