Skip to content

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

Merged
danielhanchen merged 9 commits into
mainfrom
studio-hub-audio-run-refuse
Oct 15, 2026
Merged

danielhanchen merged 9 commits into
mainfrom
studio-hub-audio-run-refuse

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Fixes #13775

Summary

In the Model Hub, clicking Run on a downloaded speech or music model that the Audio page cannot run opened it in Chat instead. Chat cannot load these models either. For example, NVIDIA's own nvidia/magpie_tts_multilingual_357m GGUF (architecture magpietts) failed in Chat with "The installed llama.cpp does not recognise this GGUF's model architecture", after it had already unloaded the current chat model. The openbmb/VoxCPM2 safetensors went to Chat the same way.

The chat model picker already refuses these picks with a toast: " is not an audio model Unsloth can run yet. The Audio page lists the families it supports." Hub Run now does the same thing. It shows that toast and stays on the Hub, rather than opening Chat.

Changes

  • hubAudioRunRefused in features/hub/lib/model-run-selection.ts returns true for a Hub-backed model whose task is text-to-speech, text-to-audio or audio-to-audio when hubModelRunsOnAudioPage is false. It uses the same task resolution as the Audio handoff (taskForMediaPick + hubAudioTask).
  • handleRun in hub-page.tsx checks it before the chat handoff.
  • A text-to-speech GGUF is not refused if its Hub library is transformers or gguf, or if it lists no library. Chat loads those GGUFs through llama.cpp and reads an Orpheus-style codec vocabulary at load time, so a fine-tune whose name matches no supported family, such as freddyaboulton/3b-fr-ft-research_release-Q4_K_M-GGUF, still speaks in Chat as it does on main. NVIDIA's Magpie GGUF lists nemo as its library and is refused. CSM GGUFs are refused whatever library they list, because llama.cpp has no CSM decoder (speechGgufIsUndecodable).
  • scripts/check-bundle-budget.ts: raises the startup budget by this PR's measured growth: 82 B transfer, and 0 B raw against 42735fcf2. main had 0 B raw spare, and the same tree builds 6,770,921 or 6,770,972 B raw in two checkouts, so raw is raised to cover the 6,612.3 KB that staging CI read.
  • Nothing else changes:
    • Models the Audio page runs still open there. Examples: the audio.cpp builds such as audio-cpp/MiniMax-Music3-GGUF and MagpieTTS-Multilingual-357M-GGUF, plus Orpheus, Whisper and the separation GGUFs.
    • Chat models keep their Chat Run.
    • Transcription models keep their Chat Run.
    • Filesystem rows with no Hub id keep their Chat Run.
    • A model with no audio pipeline tag keeps its Chat Run, for example when the Hub card has not loaded or you are offline.

Testing

Run in studio/frontend:

  • npm test: 12292 / 12292 pass.
  • npm run typecheck: passes.
  • npm run bundle:check on this branch merged with main 02d9ea35a: within budget (0.1 KB transfer, 0.1 KB raw to spare).
  • CI failures not from this PR: main's tests/tray-server-status.test.ts (fails on main ffa8fc3b9 without this PR), and the diffusion backend tests from Studio diffusion: learned activation peaks, OOM retry in group offload setup, pinned GGUF host copies, tied-weight groups #13724 on staging.
  • Biome: no new errors in the changed source files.
  • New case in tests/hub-media-run-gate.test.ts. It covers the refused models (Magpie NeMo GGUF, a CSM GGUF, an ACE music GGUF that is not built for audio.cpp, VoxCPM2 safetensors, MusicGen) and the ones that must not be refused (MiniMax Music 3 GGUF, Orpheus, an Orpheus fine-tune GGUF named for no family, a GGUF with no library, a chat LLM, a NeMo ASR model, an untagged row, a filesystem row).

I also ran both sides with Playwright, each Studio built from its own tree. Both used one HF cache holding nvidia/magpie_tts_multilingual_357m (f16 GGUF), openbmb/VoxCPM2 and audio-cpp/MiniMax-Music3-GGUF, and both had a CUDA GPU visible:

Hub Run on main this PR
nvidia/magpie_tts_multilingual_357m opens /chat run settings; Load fails with the llama.cpp architecture error toast, stays on the Hub
openbmb/VoxCPM2 opens /chat run settings toast, stays on the Hub
audio-cpp/MiniMax-Music3-GGUF opens /audio?workflow=music opens /audio?workflow=music (unchanged)

The Audio page lists are the same on both sides:

  • Text to Speech > On Device shows neither Magpie NeMo nor VoxCPM2 safetensors. Studio runs only their audio.cpp builds, and those are listed under Recommended.
  • Music > On Device lists MiniMax Music 3.

Screenshots

Same cache on both sides: main on the left, this PR on the right. Each shot was taken after clicking Run in the Hub inspector.

nvidia/magpie_tts_multilingual_357m: main opens Chat run settings; this PR keeps the Hub open and explains why.

Magpie NeMo GGUF, Hub Run, main vs this PR

openbmb/VoxCPM2: main opens Chat run settings; this PR keeps the Hub open and explains why.

VoxCPM2 safetensors, Hub Run, main vs this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T11:59:54.745872Z c9c747e Manual request
🔒 Security Review ⚠️ Failed 2026-10-15T07:20:09.345501Z e50b727 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 15, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 15, 2026
@danielhanchen danielhanchen self-assigned this Oct 15, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: e50b727110

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2e9f0c26d3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +234 to +239
!speechGgufIsUndecodable({
isGguf: true,
id,
baseModel: model.baseModel,
tags: model.tags,
})

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Honor header-classified CSM before the GGUF exemption

For a chat-eligible cached Hub GGUF whose header identifies model.audioType as "csm", but whose renamed repo, base model, and tags do not contain a csm segment, speechGgufIsUndecodable returns false and this library exemption sends Run to Chat even though llama.cpp cannot decode it. Fresh evidence beyond the previously fixed named-CSM case is the header-derived audioType, which SelectedModelView carries but this check discards; test it before applying the exemption so renamed CSM checkpoints cannot unload the resident model and then fail.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not changing this one: a CSM GGUF renamed so that no id, base model or tag names it is a rare corner, and it already reached Chat this way on main. Named CSM GGUFs, the realistic case, are refused.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f7b02f8813

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +234 to +235
(!library || LLAMA_CPP_GGUF_LIBRARIES.has(library)) &&
!speechGgufIsUndecodable({

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restrict the speech GGUF exemption to supported codecs

For a cached Llasa GGUF tagged text-to-speech with libraryName: "transformers" (or no library metadata), this exemption returns before the Audio routability check, so hubModelRunsOnAudioPage is false while hubAudioRunRefused is also false and Hub Run still opens Chat. The shared policy in audio-picker-policy.ts:120-131 explicitly excludes Llasa because its XCodec2 output cannot be decoded, so this recreates the unload-then-fail behavior the gate is meant to prevent; require evidence of a supported speech codec rather than treating the container library as decoder evidence.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping this as is: the exemption is deliberate. Speech GGUFs on a llama.cpp stack keep main's Chat Run because chat reads the codec vocabulary only at load; requiring codec evidence up front would refuse Orpheus fine-tunes named for no family (e.g. freddyaboulton/3b-fr-ft-research_release-Q4_K_M-GGUF), which speak in Chat today. A Llasa GGUF loads in llama.cpp there exactly as on main, so nothing regresses.

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 15, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 15, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: f7b02f8813

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 5682cfec18

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen

Copy link
Copy Markdown
Member Author

pre-commit.ci run

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: c9c747e62c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit a9c59af into main Oct 15, 2026
@danielhanchen
danielhanchen deleted the studio-hub-audio-run-refuse branch October 15, 2026 12:10
Etherll added a commit to Etherll/unsloth that referenced this pull request Oct 15, 2026
Conflicts were main's test comment trim (unslothai#13844) against this PR's test
changes, plus the bundle budget. Each test keeps this PR's code with main's
shorter comments and docstrings; the budget keeps main's unslothai#13812/unslothai#13446 notes
and adds this PR's measured growth against 50b9dea (+1,475 B raw / +279 B
transfer) on top of main's limits.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Audio models arn't showing in the lists.

1 participant