Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Studio: keep renamed audio.cpp options at generation time (#14901)
Daniel Han472b1cafe3f5
diff --git a/studio/backend/core/inference/audio_cpp_models.py b/studio/backend/core/inference/audio_cpp_models.pyindex b9addf803d9..5e357209653 100644--- a/studio/backend/core/inference/audio_cpp_models.py+++ b/studio/backend/core/inference/audio_cpp_models.py@@ -2336,16 +2336,23 @@ def takes_seed(model: "AudioCppModel", workflow: str) -> bool:def ignored_options(model: "AudioCppModel", workflow: str, values: Optional[dict]) -> list[str]:"""User-sent option names the request will not carry: not offered for ``workflow``, or left out- of a strict spec. ``voice`` travels top level and ``seed`` is the caller's to check."""+ of a strict spec. ``voice`` travels top level and ``seed`` is the caller's to check. A renamed+ option is judged under its legacy name, as ``filled_options`` sends it."""if not isinstance(values, dict):return []offered = {o["name"] for o in workflow_options(model, workflow)}+ pairs = OPTION_RENAMES.get(model.family, ())+ legacy = {canonical: old for old, canonical in pairs}keys = model.request_keys+ if pairs and keys is not None:+ keys = keys | {old for old, canonical in pairs if canonical in keys}++ def dropped(name: str) -> bool:+ name = legacy.get(name, name)+ return name not in offered or (keys is not None and name not in keys)+return sorted(- name- for name in map(str, values)- if name not in ("seed", "voice")- and (name not in offered or (keys is not None and name not in keys))+ name for name in map(str, values) if name not in ("seed", "voice") and dropped(name))diff --git a/studio/backend/tests/test_audio_cpp_option_renames.py b/studio/backend/tests/test_audio_cpp_option_renames.pyindex 72481c75aef..3bbf6b1bf5c 100644--- a/studio/backend/tests/test_audio_cpp_option_renames.py+++ b/studio/backend/tests/test_audio_cpp_option_renames.py@@ -232,3 +232,27 @@ def test_a_v091_runtime_gets_only_legacy_names(hub, monkeypatch, tmp_path, familassert canonical not in out, (values, out)if values:assert out[old] == 1.5+++from test_audio_cpp_convert_requests import _backend, _convert, started # noqa: E402, F401+++ "family, embedded, values, wire, value",+ [+ ("seed_vc", SEED_VC_NEW, {"length_adjust": 1.5}, "duration_scale", "1.5"),+ ("seed_vc", SEED_VC_NEW, {"duration_scale": 1.5}, "duration_scale", "1.5"),+ ("seed_vc", SEED_VC_OLD, {"duration_scale": 1.5}, "length_adjust", "1.5"),+ ("chatterbox", CHATTERBOX_NEW, {"flow_guidance_scale": 1.0}, "s3gen_cfg_rate", "1"),+ ("chatterbox", CHATTERBOX_NEW, {"s3gen_cfg_rate": 1.0}, "s3gen_cfg_rate", "1"),+ ],+)+def test_generation_keeps_a_renamed_option_under_either_name(+ hub, monkeypatch, tmp_path, started, family, embedded, values, wire, value+):+ model = _resolve(hub, monkeypatch, tmp_path, family, embedded, runtime = embedded)+ backend = _backend(model, started)+ request = _convert(backend, options = {**values, "bogus": 1})+ assert request["options"][wire] == value+ # A genuinely unsupported option is still dropped and reported.+ assert backend.last_generation_stats["ignored_options"] == ["bogus"]