Skip to content

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.

Studio: Hub Run refuses audio models that neither Audio nor Chat can run (#13812)

Daniel Hana9c59afd5fc0
diff --git a/studio/frontend/scripts/check-bundle-budget.ts b/studio/frontend/scripts/check-bundle-budget.ts
index 15a180107c5..e1d0c36ae4a 100644
--- a/studio/frontend/scripts/check-bundle-budget.ts
+++ b/studio/frontend/scripts/check-bundle-budget.ts
@@ -140,8 +140,11 @@ export const BUDGET = {
// module the eager browser store imports for tab close and duplicate (6,771,852 -> 6,773,496 B raw, 2,035,948 ->
// 2,036,414 B transfer against 82f16ca55, one machine and build, Node 24, chunk count unchanged at 95). Raised by
// that growth.
- transferBytes: 2_036_414,
- rawBytes: 6_773_496,
+ // Hub Run refusing audio models neither Audio nor chat can run (#13812) adds 77 B raw / 65 B transfer
+ // (6,773,445 -> 6,773,522 B raw, 2,036,392 -> 2,036,457 B transfer against 59ab069b5, one machine and build,
+ // Node 24, chunk count unchanged at 95). Raised by that growth.
+ transferBytes: 2_036_479,
+ rawBytes: 6_773_573,
};
// The chunk count is reported but not budgeted. Splitting a page out of the entry raises it while lowering the
diff --git a/studio/frontend/src/features/hub/hub-page.tsx b/studio/frontend/src/features/hub/hub-page.tsx
index 31ea299233d..f634e84257a 100644
--- a/studio/frontend/src/features/hub/hub-page.tsx
+++ b/studio/frontend/src/features/hub/hub-page.tsx
@@ -108,6 +108,7 @@ import { residentModelIdMatches } from "./lib/model-identity";
import {
createHubModelConfigHandoff,
type HubModelRunSelection,
+ hubAudioRunRefused,
hubAudioTask,
} from "./lib/model-run-selection";
import {
@@ -1656,6 +1657,18 @@ export function ModelsPage() {
});
return;
}
+ if (
+ hubAudioRunRefused(
+ selectedModel,
+ taskForMediaPick(selectedModel.pipelineTag, selectedModel.task),
+ )
+ ) {
+ toast.error(
+ `${selectedModel.hubRepoId} is not an audio model Unsloth can run yet. The Audio page lists the families it supports.`,
+ { duration: 7000 },
+ );
+ return;
+ }
const controller = runConfigOpenCoordinator.begin();
setRunConfigOpening({ modelId: selectedModel.id, controller });
try {
diff --git a/studio/frontend/src/features/hub/lib/model-run-selection.ts b/studio/frontend/src/features/hub/lib/model-run-selection.ts
index dfe0b6ae479..7740571dd5b 100644
--- a/studio/frontend/src/features/hub/lib/model-run-selection.ts
+++ b/studio/frontend/src/features/hub/lib/model-run-selection.ts
@@ -7,6 +7,7 @@ import type { ModelConfigHandoffRequest } from "@/features/model-picker";
import {
audioPickIsRoutable,
curatedAudioInventoryTask,
+ speechGgufIsUndecodable,
} from "@/features/model-picker/components/model-selector/audio-picker-policy";
import {
AUDIO_CATALOG,
@@ -199,6 +200,49 @@ export function hubModelRunsOnAudioPage(
});
}
+// Speech, music and separation tasks. ASR is left out: chat keeps its Run for transcription
+// models (MLX Whisper on Mac reaches Audio only from the picker).
+const CHAT_UNLOADABLE_AUDIO_TASKS: ReadonlySet<string> = new Set([
+ "text-to-speech",
+ "text-to-audio",
+ "audio-to-audio",
+]);
+
+// A speech GGUF from these stacks loads in llama.cpp, and chat reads an Orpheus-style codec
+// vocabulary at load, so a fine-tune named for no family still speaks there. Other libraries (nemo) do not load.
+const LLAMA_CPP_GGUF_LIBRARIES: ReadonlySet<string> = new Set([
+ "transformers",
+ "gguf",
+ "llama.cpp",
+]);
+
+/** Whether Run must refuse an audio model the Audio page cannot run, instead of handing it to
+ * chat, which cannot load it either and would unload the chat model first. The chat picker
+ * refuses the same picks. */
+export function hubAudioRunRefused(
+ model: SelectedModelView,
+ task: string | null,
+): boolean {
+ const id = model.hubRepoId;
+ if (!id || !routableToMediaPage(model.kind, model.localSource)) return false;
+ const audioTask = hubAudioTask(model, task);
+ if (!audioTask || !CHAT_UNLOADABLE_AUDIO_TASKS.has(audioTask)) return false;
+ const library = model.libraryName?.toLowerCase();
+ if (
+ audioTask === "text-to-speech" &&
+ model.isGguf &&
+ (!library || LLAMA_CPP_GGUF_LIBRARIES.has(library)) &&
+ !speechGgufIsUndecodable({
+ isGguf: true,
+ id,
+ baseModel: model.baseModel,
+ tags: model.tags,
+ })
+ )
+ return false;
+ return !hubModelRunsOnAudioPage(model, task);
+}
+
export function isHubModelRunEligible({
model,
isDataset,
diff --git a/studio/frontend/tests/hub-media-run-gate.test.ts b/studio/frontend/tests/hub-media-run-gate.test.ts
index d60bc5f2e0b..72edb9b135a 100644
--- a/studio/frontend/tests/hub-media-run-gate.test.ts
+++ b/studio/frontend/tests/hub-media-run-gate.test.ts
@@ -10,9 +10,8 @@ import { registerBundlerResolver } from "./helpers/kit.ts";
registerBundlerResolver();
-const { hubModelRunsOnAudioPage, isHubModelRunEligible } = await import(
- "../src/features/hub/lib/model-run-selection.ts"
-);
+const { hubAudioRunRefused, hubModelRunsOnAudioPage, isHubModelRunEligible } =
+ await import("../src/features/hub/lib/model-run-selection.ts");
const { taskForMediaPick } = await import(
"../src/features/model-picker/components/model-selector/audio-picker-policy.ts"
);
@@ -187,6 +186,145 @@ test("an audio model the Audio page runs opens there, the rest keep their chat R
);
});
+// #13775: NVIDIA's own Magpie GGUF (arch magpietts) and the VoxCPM2 safetensors are tagged
+// text-to-speech but only their audio.cpp builds run; Run opened them in chat, which failed.
+test("Run refuses an audio model neither Audio nor chat can run", () => {
+ const audio = (overrides: Partial<SelectedModelView>): SelectedModelView => ({
+ ...mediaModel(undefined, "cache"),
+ runtimeCanChat: true,
+ ...overrides,
+ });
+ const refused = (model: SelectedModelView) =>
+ hubAudioRunRefused(model, taskForMediaPick(model.pipelineTag, model.task));
+ const magpie = audio({
+ id: "nvidia/magpie_tts_multilingual_357m",
+ hubRepoId: "nvidia/magpie_tts_multilingual_357m",
+ isGguf: true,
+ modelFormat: "gguf",
+ pipelineTag: "text-to-speech",
+ task: "text-generation",
+ libraryName: "nemo",
+ tags: ["nemo", "gguf", "text-to-speech"],
+ });
+ assert.equal(refused(magpie), true);
+ assert.equal(
+ refused(
+ audio({
+ hubRepoId: "openbmb/VoxCPM2",
+ pipelineTag: "text-to-speech",
+ libraryName: "voxcpm",
+ }),
+ ),
+ true,
+ );
+ assert.equal(
+ refused(
+ audio({
+ hubRepoId: "facebook/musicgen-small",
+ pipelineTag: "text-to-audio",
+ }),
+ ),
+ true,
+ );
+ // What Audio runs opens there, and the refusal never fires for it.
+ assert.equal(
+ refused(
+ audio({
+ id: "audio-cpp/MiniMax-Music3-GGUF",
+ hubRepoId: "audio-cpp/MiniMax-Music3-GGUF",
+ isGguf: true,
+ modelFormat: "gguf",
+ pipelineTag: "text-to-audio",
+ task: "text-to-audio",
+ libraryName: "audio.cpp",
+ }),
+ ),
+ false,
+ );
+ assert.equal(
+ refused(
+ audio({
+ hubRepoId: "unsloth/orpheus-3b-0.1-ft",
+ pipelineTag: "text-to-speech",
+ }),
+ ),
+ false,
+ );
+ // An Orpheus fine-tune GGUF named for no family loads in llama.cpp, and chat speaks it.
+ assert.equal(
+ refused(
+ audio({
+ id: "freddyaboulton/3b-fr-ft-research_release-Q4_K_M-GGUF",
+ hubRepoId: "freddyaboulton/3b-fr-ft-research_release-Q4_K_M-GGUF",
+ isGguf: true,
+ modelFormat: "gguf",
+ pipelineTag: "text-to-speech",
+ task: "text-generation",
+ libraryName: "transformers",
+ baseModel: "canopylabs/3b-fr-ft-research_release",
+ tags: ["transformers", "gguf", "text-to-speech"],
+ }),
+ ),
+ false,
+ );
+ assert.equal(refused({ ...magpie, libraryName: undefined }), false);
+ // The codec vocabulary is a speech exemption: a music GGUF Audio cannot run is refused.
+ assert.equal(
+ refused(
+ audio({
+ id: "calcuis/ace-gguf",
+ hubRepoId: "calcuis/ace-gguf",
+ isGguf: true,
+ modelFormat: "gguf",
+ pipelineTag: "text-to-audio",
+ task: "text-generation",
+ tags: ["gguf", "text-to-audio"],
+ }),
+ ),
+ true,
+ );
+ // llama.cpp has no CSM decoder, whatever library the card names.
+ assert.equal(
+ refused(
+ audio({
+ id: "ggml-org/sesame-csm-1b-GGUF",
+ hubRepoId: "ggml-org/sesame-csm-1b-GGUF",
+ isGguf: true,
+ modelFormat: "gguf",
+ pipelineTag: "text-to-speech",
+ task: "text-generation",
+ tags: ["gguf", "text-to-speech"],
+ }),
+ ),
+ true,
+ );
+ // Chat models, transcription and filesystem rows keep their chat Run.
+ assert.equal(
+ refused(
+ audio({ hubRepoId: "unsloth/Qwen3-8B", pipelineTag: "text-generation" }),
+ ),
+ false,
+ );
+ assert.equal(
+ refused(
+ audio({
+ hubRepoId: "nvidia/parakeet-tdt-0.6b-v3",
+ pipelineTag: "automatic-speech-recognition",
+ libraryName: "nemo",
+ }),
+ ),
+ false,
+ );
+ assert.equal(refused({ ...magpie, pipelineTag: undefined }), false);
+ assert.equal(
+ refused({
+ ...mediaModel("text-to-speech", "local", "models_dir"),
+ hubRepoId: "openbmb/VoxCPM2",
+ }),
+ false,
+ );
+});
+
test("a cached separation GGUF opens Separate: its audio type reaches the gate", () => {
const model: SelectedModelView = {
...mediaModel(undefined, "cache"),