Skip to content

Studio: audio.cpp v0.9.2 support - #14073

Merged
danielhanchen merged 18 commits into
unslothai:mainfrom
Etherll:fix/inline-audiocpp-v092-support-cf09a3cd
Oct 18, 2026
Merged

danielhanchen merged 18 commits into
unslothai:mainfrom
Etherll:fix/inline-audiocpp-v092-support-cf09a3cd

Conversation

@Etherll

@Etherll Etherll commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The refreshed GGUFs in audio-cpp/audio.cpp-gguf follow audio.cpp v0.9.2. That release renames several request options and checks model_specs/ before a GGUF's embedded spec. It also loads families that Unsloth Studio was hiding as "needs a newer audio runtime". With this change Unsloth Studio sends option names that both v0.9.1 and v0.9.2 accept, works out which families the installed runtime loads from the runtime's own spec files instead of a hard-coded list, and offers the newly supported models.

Changes

Renamed options. Chatterbox s3gen_cfg_rate -> flow_guidance_scale, Seed-VC length_adjust -> duration_scale, and ACE-Step lm_cfg_scale -> lm_guidance_scale are kept in a fixed OPTION_RENAMES table. The option panel shows each one once, under the legacy name. On the wire exactly one name is sent: the v0.9.2 name when the model's strict request contract lists it, otherwise the legacy name (v0.9.2 still reads it). A value given under either name (UI, API or MCP) is folded into that one option, so v0.9.2 no longer fails Chatterbox Convert with "conflicting option values", and the Seed-VC Length slider reaches refreshed GGUFs as duration_scale.

Runtime family detection. install_audio_cpp_prebuilt.py now fetches model_specs/*.json from the release manifest's source_commit (never the tag, because the fork's tags point at a packaging commit with an older tree) and puts the folder next to the server. Every file is checked against its git blob sha and must parse as a JSON object. The fetch is all or nothing: a failure leaves no folder and does not fail the install. The install record now stores source_commit. Existing managed installs get a one-time background backfill at startup (skipped when UNSLOTH_DISABLE_UPDATE_CHECK=1). It takes the commit from the record, the release manifest, or the server version string, and it runs under the install lock. runtime_knows_family reads that folder, and audio_cpp_spec_families.py (the hard-coded family list for v0.9.0/v0.9.1) is deleted.

Contract order. On v0.9.2 and newer, request keys, options and required inputs come from model_specs/ first and then the GGUF's embedded spec. On older prebuilt runtimes only the embedded spec counts, so a backfilled folder does not change what an old runtime is asked to do.

Old-runtime download gate. On a prebuilt runtime older than v0.9.2, Unsloth Studio refuses to download audio GGUF files that are not already cached, for both TTS loads and the Transcribe download path. The error is " needs a newer audio runtime before its files can be downloaded. Update the audio runtime from the update banner, or run unsloth studio update." A Hub download job is refused with HTTP 409 and the same message, for the shared repo's folders, their companions (MioTTS's MioCodec), audio repos outside it such as audio-cpp/MiniMax-Music3-GGUF, and scoped jobs (scope_id plus files) that would fetch an uncached audio GGUF. Transcribe's timestamp aligner download is checked the same way. Only an old runtime looks a repo up for this, so other downloads are unaffected. Fully cached models, local files and custom builds (unknown version) are not affected.

Runtime swap. Replacing the audio runtime from the update banner now drops every resolved audio model, so a reload right after the update uses the new runtime's spec files rather than a five-minute-old resolution.

New models. The pickers now offer Voxtral-4B-TTS-2603, KugelAudio-0-Open, OWSM, OWSM-CTC, CrisperWhisper 2.0 and Hviske-v6. Name hints are fixed so a Voxtral TTS file name is no longer guessed as the realtime ASR family voxtral_realtime (its GGUF header names voxtral_tts), and kitten-tts2 is no longer matched as kitten_tts. Transcribe sends language: "auto" to OWSM and OWSM-CTC (they take ISO 639-3 codes, and <en> fails) and reports the language OWSM detects (OWSM-CTC detects none, so the chosen language is kept), and sends no language to models whose strict contract has no such option (Hviske-v6).

Header-only rebuild. When a republished GGUF has the same tensors as the cached older copy, the backend fetches only the new header and rebuilds the file from the cached blob instead of downloading the whole file again (one metadata request, only when an older copy is cached). All 138 GGUFs the refresh rewrites were checked to be header-only. Any failure falls back to the normal download.

Testing

Live runs on Linux against the prebuilt runtimes, using the Unsloth Studio backend code paths directly (CUDA on a shared GPU, CPU for v0.9.1). Every server request was logged.

  • Install of v0.9.2-unsloth.1 (CUDA) put 122 spec files beside the server with no .model_specs-* leftovers, and the record has source_commit. With the spec fetch pointed at an unreachable host, the install still succeeded, left no folder, and every family read as unknown.
  • On v0.9.2, runtime_release_key() returned (0, 9, 2), and runtime_knows_family was True for voxtral_tts, kugelaudio, owsm, owsm_ctc, crisperwhisper and hviske_asr_v6, and False for a made-up family.
  • All six newly offered models downloaded, loaded and ran. OWSM, OWSM-CTC, CrisperWhisper and Hviske-v6 transcribed a 4.2 s English clip. Voxtral and KugelAudio produced speech that CrisperWhisper transcribed back as the input sentence. Hviske-v6 requests carried no language field and OWSM requests sent "auto"; all returned 200.
  • With the refreshed GGUFs (spec-refresh-v0.9.2 revision), Chatterbox Convert and Seed-VC Convert sent exactly one name per renamed pair (s3gen_cfg_rate, duration_scale), whichever name the value was entered under, and the server returned 200. On the Seed-VC V1 routes, length_adjust 1.5 vs 1.0 gave 6.316 s vs 4.214 s output. The default V2 route ignores the option, as the v0.9.2 spec documents, so the Length control has no effect there. That behaviour predates this change.
  • On v0.9.1-unsloth.1 (CPU), uncached Chatterbox-Turbo (TTS) and OWSM small (Transcribe) were refused with the new message, and no download was started (blob count unchanged). Cached OWSM base still loaded and transcribed, and it used the v0.9.1 key beam_size instead of v0.9.2's num_beams. Cached Hviske-v6 and Voxtral TTS were reported as needing a newer runtime.
  • Backfill on a copy of a v0.9.1 install with model_specs/ and source_commit removed: it recovered commit cf124a67cc55 from the release manifest, wrote 112 specs with no leftovers, and a second call was a no-op.

Unit tests (new: test_audio_cpp_option_renames.py, test_audio_cpp_runtime_specs.py, test_audio_cpp_catalog_v092.py, test_audio_cpp_header_rebuild.py, plus install-time fetch cases in tests/studio/install/test_install_audio_cpp_prebuilt_logic.py):

  • studio/backend: every tests/test_audio_cpp_*.py, test_stt_audiocpp_details.py and test_gguf_header_delta.py test passes in a full backend run (-n 16). The other failures in that run are environment-only (a local venv with a mismatched huggingface-hub) and reproduce identically on main.
  • tests/studio/install/test_install_audio_cpp_prebuilt_logic.py: 186 passed.
  • studio/frontend: npm run typecheck clean; node --experimental-strip-types --test tests/audio-cpp-catalog.test.ts tests/audio-picker-filter.test.ts tests/recommended-curated-row-metadata.test.ts tests/audio-convert-panels.test.ts tests/audio-run-api.test.ts: 100 passed; npm run catalog:check passes.
  • ruff check (0.15.12) clean on the changed Python files.

Notes

  • VibeVoice-ASR-Streaming-7B-GGUF exists only on the spec-refresh-v0.9.2 branch of audio-cpp/audio.cpp-gguf. The pickers hold it back (listed in AUDIO_CPP_UNOFFERED_FOLDERS) until the main branch is refreshed; the backend still loads it by id. The nightly network catalog check flags that entry until then.
  • The gate covers every not-yet-cached audio GGUF on a runtime older than v0.9.2, not only refreshed ones, because Unsloth Studio cannot tell from the listing which files the refresh changed. The existing update banner already offers v0.9.2.
  • Not changed here: the KugelAudio Speak page shows both its voice and voice_id controls, and OWSM always detects the language. Both are left for follow-ups.

UI before / after

Audio page, "Select audio model" picker on the Recommended tab, searched for each newly offered row (Transcribe for ASR, Text to Speech for TTS). Base 4c5fb40 (left) vs this branch at e6b289d (right), two separate installs. Hviske-v5.3-GGUF is the control row and shows on both sides.

Audio picker rows before and after

- Send one name per renamed option (Chatterbox s3gen_cfg_rate, Seed-VC
  length_adjust, ACE-Step lm_cfg_scale): the legacy name unless the
  model's strict contract lists the v0.9.2 name.
- Refuse audio GGUF downloads on a runtime older than v0.9.2; cached
  files keep loading.
- Fetch model_specs/ at the release's source commit during install, all
  or nothing, with a one-time backfill for existing managed installs.
  Drop the hard-coded family list.
- Follow the runtime's contract order: model_specs/ first on v0.9.2,
  the GGUF's embedded spec on older runtimes.
- Offer Voxtral-4B-TTS, KugelAudio, OWSM, OWSM-CTC, CrisperWhisper,
  Hviske-v6 and VibeVoice-ASR-Streaming-7B; fix the voxtral and kitten
  name hints.
- Rebuild republished GGUFs whose tensors did not change from the cached
  copy, fetching only the new header.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 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 ⚠️ Failed 2026-10-18T17:00:51.898818Z 94f24f7 New commits
ℹ️ 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.

pre-commit-ci Bot and others added 3 commits October 17, 2026 19:55
- Check each companion (MioTTS's MioCodec) before downloading anything,
  not only the model's own files.
- Refuse a Hub download job for an audio GGUF on a runtime older than
  v0.9.2 with the same message (HTTP 409).
- Fetch model_specs/ with one short try per request, so a network that
  blocks GitHub no longer holds the install or backfill for minutes.
The Hub planner adds a model's companion files (MioTTS's MioCodec) to the
same job, so check them as well as the model itself before it starts.
…untime swap

- Refuse a Hub download job outside the shared audio repo (such as
  audio-cpp/MiniMax-Music3-GGUF) on a runtime older than v0.9.2 too. Only an
  old runtime looks the repo up, so other downloads are unaffected.
- Forget every resolved audio model when the audio runtime is replaced, so a
  reload no longer reuses the old runtime's option names for five minutes.
- Return the language OWSM detects instead of the choice it ignores.
- Hold VibeVoice-ASR-Streaming-7B back from the Transcribe picker until the
  Hub's main branch carries it.
OWSM-CTC has no language detection and returns the "auto" it was sent, so
fall back to the caller's choice instead. OWSM still reports what it heard.
…ld runtime

- A scoped Hub job (scope_id plus files) skips the variant planner, so check
  the GGUFs it would fetch: the shared repo's files by their folder row,
  any other repo as a whole. Cached files and non-GGUF files pass.
- Transcribe's timestamp aligner download gets the same old-runtime check
  as the model's own files.
… cache

- Resolve each scoped GGUF at the variant it belongs to, so a request for an
  uncached Q4_K_M is refused even when the default Q8_0 is cached.
- Look the files up in Unsloth Studio's active Hugging Face cache, not the
  one the library saw at import.
@Etherll

Etherll commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator Author

Review round done at 55f2ad97a4. This round's fixes:

  • Old-runtime download gate covers every Hub job. On a runtime older than v0.9.2, Unsloth Studio returns 409 ("… needs a newer audio runtime … Update the audio runtime …") for all of these:

    • the shared repo's folders and their companions;
    • audio repos outside it, such as audio-cpp/MiniMax-Music3-GGUF;
    • scoped jobs (scope_id plus files). These are checked at the quant of the file requested and against the active Hugging Face cache.

    Transcribe's timestamp aligner download gets the same check. Other downloads never look a repo up for this.

  • Runtime swap. Updating the audio runtime drops every resolved audio model before loads are allowed again. A reload no longer reuses the old runtime's option names.

  • OWSM language. The result reports the language OWSM detects. OWSM-CTC only echoes auto, so the chosen language is kept for it.

  • VibeVoice-ASR-Streaming-7B is held back from the Transcribe picker until the Hub's main branch has it. The backend still loads it by id.

Verification:

  • Backend audio, STT and download suites: 2115 passed, 2 skipped (-n 2).
  • Frontend: 12525 tests passed, npm run typecheck clean, npm run catalog:check passes.
  • Installer logic: 186 passed.
  • Each new regression test fails on the code before its fix.
  • ruff check (0.6.9, the pre-commit pin) is clean.

The network catalog check still flags VibeVoice-ASR-Streaming-7B-GGUF, as expected until the Hub's main branch is refreshed. It also flags three folders the Hub added since (OpenWakeWord-GGUF, Plapre-3-GGUF, Whistle-GGUF), which main flags too.

This PR has no layout or styling changes; the frontend diff is catalog rows only.

@danielhanchen danielhanchen self-assigned this Oct 18, 2026
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member

@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: e6b289deac

ℹ️ 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".

if found is not None:
checked.append(found)
for item in checked:
problem = stale_runtime_download_problem(item)

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 the selected cache in the old-runtime gate

When download_dir targets a custom Models folder, download_model_response does not compute cache_paths.hub_cache until after this gate, so this default probe (and the scoped cached() probe below) reads the active cache rather than the worker's destination. On a v0.9.1 runtime, a model cached only in the requested custom folder is rejected even though the job would fetch nothing; conversely, an active-cache hit can authorize a fetch into an empty custom folder and defeat the protection. Compute the destination first and thread its Hub cache through all of these checks.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not changing this: it needs an old runtime plus a per-request download_dir that differs from the active cache, with the model cached in only one of them; the worst case is the pre-PR behaviour (no gate) or a refused job that would have fetched nothing.

Comment on lines +2802 to +2803
model = resolve(row, None if names else variant, hf_token, network = network)
checked = [model] if model is not None else []

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 Check every variant before full-snapshot downloads

For a non-scoped audio repo outside the folder-row form with no gguf_variant, names is None, so this resolves and checks only the default variant. The worker receives no variant and runs the full-snapshot path (hub/workers/hf_download.py), so if the default variant is cached but another GGUF is not, the gate passes and downloads the sibling; once cached, that sibling also passes the missing-files gate and can be selected on the old runtime. Full-snapshot jobs need to inspect every missing audio GGUF/variant rather than only the default.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not changing this: the UI always sends the variant for non-scoped GGUF jobs (download-api-adapter.ts), so a variant-less full-snapshot job of a non-umbrella audio repo is API-only, and it falls back to the pre-PR behaviour rather than breaking anything.

@danielhanchen

Copy link
Copy Markdown
Member

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 18, 2026

@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: e6b289deac

ℹ️ 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".

blobs = dict(
zip(
entries,
pool.map(lambda item: _spec_bytes(repo, commit, *item), entries.items()),

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 Stop queued spec fetches after the first failure

When the tree request succeeds but requests to raw.githubusercontent.com time out, ThreadPoolExecutor.map eagerly queues every spec blob and the executor context waits for all queued work even after the first future raises. With roughly 122 specs, 8 workers, and the 10-second per-request timeout, this optional step can stall an install or in-app update for about ceil(122/8) * 10 seconds rather than one short failed try (and the in-app path has already unloaded audio models). Stop scheduling or cancel pending futures after the first blob failure.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Executor.map cancels the futures it has not started as soon as one result raises (the finally in result_iterator, present on 3.11 and 3.13), so only the up to 8 in-flight requests finish. Measured: 122 failing blobs at 0.5 s each return in 1.1 s, one wave, not 16.

@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@danielhanchen

Copy link
Copy Markdown
Member

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member

@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: 84aa51d2fc

ℹ️ 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 +492 to +495
rebuilt = [
path
for path, _size in missing
if AudioCppBackend._rebuild_header_only(model, path, hf_token, cache_dir, cancel_event)

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 Run header reuse in user-facing audio downloads

When a user selects a republished audio model while its older GGUF is cached, the normal Audio-page paths never reach this optimization: checked use-audio-model-slot.ts, which stages TTS downloads through hub/workers/hf_download.py (where _rebuild_header_only_ggufs explicitly restricts reuse to image/video), and use-stt-sidecar.ts, which sends ASR downloads through stt_download_worker.py. Only an API-triggered AudioCppBackend._download_missing reaches this call, so the primary Studio flows still transfer the full multi-GB GGUF instead of reusing its unchanged tensors; invoke the rebuild from those workers or route those downloads through this path.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not changing this here: it is a bandwidth optimisation, and the Audio-page worker paths still download the full file correctly, so nothing is wrong or lost; extending header reuse to those workers is a follow-up.

@danielhanchen

Copy link
Copy Markdown
Member

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

Failed to sample tokens
ℹ️ 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

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

Failed to sample tokens
ℹ️ 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".

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 18, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 18, 2026
@danielhanchen
danielhanchen merged commit 475a02a into unslothai:main Oct 18, 2026
alphataubio added a commit to alphataubio/unsloth-alphataubio that referenced this pull request Oct 18, 2026
…ach limit

Both sides raised the same eager-startup-JS budget: this branch for the DeepInfra connection
(~75 B raw / ~30 B transfer) and upstream for the audio.cpp v0.9.2 picker rows (unslothai#14073,
+253 B raw / +59 B transfer). Both rationales are kept and each limit takes the LARGER
measurement so neither PR's headroom is silently given back: transfer 2_047_608 (from unslothai#14073)
and raw 6_806_162 (from the DeepInfra raise).
alphataubio added a commit to alphataubio/unsloth-alphataubio that referenced this pull request Oct 18, 2026
The previous merge commit (d506d77) resolved this file by staging it with the
<<<<<<< / ======= / >>>>>>> markers still in place, so both sides' budget blocks and both
pairs of transferBytes/rawBytes lines were committed. The file was not valid TypeScript.

This keeps one resolved block: both rationale comments (unslothai#14073 and DeepInfra) and the
larger of each limit, transferBytes 2_047_608 and rawBytes 6_806_162, as the merge
intended.
iam-knoit added a commit to SynhalaAI/unsloth that referenced this pull request Oct 19, 2026
danielhanchen added a commit that referenced this pull request Oct 19, 2026
danielhanchen added a commit that referenced this pull request Oct 19, 2026
…eset the startup budget to the build (#14168)

## Summary

Main is over the startup bundle budget, so `Frontend build + bundle
sanity` fails on every PR based on it:

```
over the startup budget: transfer 2005.9 KB > 2003.5 KB, raw 6665.4 KB > 6659.1 KB      (main at 2fee36f)
```

This PR takes two steps. It moves #14137's prompt upsampler client out
of the startup chunks, which is real growth with a lazy home. It then
resets both limits to the measured build. Main has gone over this budget
repeatedly, and the root of that is a shortfall in how the limits were
raised, which this corrects.

## Cause

**#14137 (FLUX.3 prompt upsampling).** The Images page is lazy
(`ImagesPage = lazy(...)` in `__root.tsx`), but `features/images/api.ts`
is not. Startup modules import it for other calls
(`loaded-models-api.ts`, `loaded-models-sources.ts`,
`use-media-companion-bytes.ts`). #14137 put the four upsampler calls
there, with value imports from `lib/prompt-enhance.ts`, so that module
joined the startup chunks. Only `prompt-enhance-panel.tsx`, inside the
lazy Images page, calls them.

**The limits themselves.** Each raise since #14073 was sized from its
own PR's delta and added to the previous limit. That previous limit
already sat below the build, starting at #14073:
- `475a02ac` measures 2,047,700 B transfer against the 2,047,608 B limit
#14073 set.
- By `2fee36ff` the gap is 6,500 B raw and 2,409 B transfer.

The raises since (#14072, #14075, #14110, #14108, #14113) each added
their delta, so the shortfall carried forward. CI agrees with my machine
to the byte: the first run of this PR read 1999.7 KB transfer on both.

## Change

- **New `features/images/prompt-upsampler-api.ts`:** holds
`getPromptUpsamplerStatus`, `startPromptUpsamplerDownload`,
`cancelPromptUpsamplerDownload` and `previewEnhancedPrompt`, moved
unchanged, with the same `parseJson` error handling.
- **`api.ts`:** now imports only the `PromptEnhancement` type from
`lib/prompt-enhance` (erased at build).
- **`prompt-enhance-panel.tsx`:** imports the calls from the new module.
- **No behavior change** in the app.
- **`check-bundle-budget.ts`:** both limits are reset to the measured
build plus the usual margin (160 B raw, 189 B transfer), with an entry
in the BUDGET comment block explaining why the reset is absolute rather
than by delta.
  - `rawBytes`: 6,819,206 (main after #14113) -> 6,825,885.
  - `transferBytes`: 2,051,727 -> 2,054,261.

## Testing

One machine and build, Node 24, exact byte totals from the budget
script, 95 chunks throughout:

| tree | raw B | transfer B |
|---|---|---|
| main `2fee36ff` | 6,825,378 | 2,053,999 |
| main `2fee36ff` + the move | 6,821,006 | 2,052,708 |
| main `78e5eefa4d` (adds #14113) + the move | 6,821,334 | 2,052,857 |
| + #14183 | 6,821,410 | 2,052,614 |
| + #14172 (one tooltip design) | 6,825,307 | 2,053,990 |
| this PR (main `b227654927`, adds #14184, + the move) | 6,825,725 |
2,054,072 |

- **The move saves:** 4,372 B raw and 1,291 B transfer.
- **#14113 adds:** 328 B raw and 149 B transfer on this build.
- **Landed while main was over, with no raise:** #14183 (+76 B raw, -243
B transfer), #14172 (+3,897 B raw, +1,376 B transfer, the shared tooltip
is in the eager shell) and #14184 (+418 B raw, +82 B transfer). This is
the treadmill the absolute reset stops: while main is red on this check,
growth lands unaccounted.
- **With the new limits:** `within budget (0.2 KB transfer, 0.2 KB raw
to spare)`.
- **`npm run typecheck`:** clean.
- **`bundle-budget-cli.test.ts`, `bundle-budget-closure.test.ts`,
`image-prompt-enhance.test.ts` and
`loaded-models-platform-matrix.test.ts`:** 74 passed.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@Etherll
Etherll deleted the fix/inline-audiocpp-v092-support-cf09a3cd branch October 20, 2026 02:11
danielhanchen added a commit to Etherll/unsloth that referenced this pull request Oct 23, 2026
…14901)

The generate path drops options the request will not carry
(`ignored_options`, unslothai#14075) before `filled_options` folds the audio.cpp
v0.9.2 renamed option names (unslothai#14073). The option panel shows a renamed
option under its legacy name and a strict v0.9.2 contract lists only the
canonical name, so valid values were dropped and the defaults sent
instead:

- Seed-VC with a strict v0.9.2 spec: `length_adjust` or `duration_scale`
1.5 reached the runtime as `duration_scale` 1.0.
- Seed-VC with an older strict spec: `duration_scale` 1.5 was dropped
and `length_adjust` 1.0 sent.
- Chatterbox: `flow_guidance_scale` 1.0 was dropped and `s3gen_cfg_rate`
0.7 sent.

`ignored_options` now judges a renamed option under its legacy name and
widens strict keys with the legacy name, matching `filled_options`.
Options the model does not take are still dropped and reported.

Tests: `test_generation_keeps_a_renamed_option_under_either_name` in
`test_audio_cpp_option_renames.py` drives a Convert generation through
the backend with a fake server for both names on Seed-VC (old and new
specs) and Chatterbox, and checks that an unknown option is still
reported. 4 of its 5 cases fail on main and all pass here. Across the
audio test files: 2312 passed vs 2308 on main; the 6 remaining failures
(`test_native_audio.py`, `soundfile` missing locally) are the same on
both sides. Not run against a live audio.cpp server.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants