Skip to content

Let audio models load into CPU RAM instead of the GPU - #10054

Merged
danielhanchen merged 13 commits into
mainfrom
feat/audio-cpu-load
Sep 3, 2026
Merged

danielhanchen merged 13 commits into
mainfrom
feat/audio-cpu-load

Conversation

@shimmyshimmer

Copy link
Copy Markdown
Member

What

Audio models currently take an accelerator whenever one is present, and there is no way to ask for anything else. This adds a device preference so the user can keep the weights in CPU RAM instead.

The default is unchanged: auto detects exactly as it does today. Nothing moves unless someone asks it to.

Why

The automatic choice is right until the GPU is the scarce resource:

  • the card is already holding a chat model
  • a training run wants every spare byte
  • the checkpoint does not fit the card at all

Whisper and the smaller TTS checkpoints are perfectly usable on CPU, and system RAM is usually the plentiful side. Today the only way to reach CPU is to make the GPU load fail first.

Where the option lives

  • Settings > Voice > "Load into" for dictation and transcription. Persisted, and sent both with the explicit Load button and with the implicit load that dictation triggers on first use.
  • Audio page > "Load model into" for TTS and music. Persisted, applied on the next load. Changing it ejects the resident model, so the choice takes effect rather than sitting unapplied.
  • UNSLOTH_AUDIO_DEVICE=cpu as a server wide default for headless and CLI installs, matching how RAG_EMBED_DEVICE already works.
  • API: device on SttLoadRequest, TranscribeRequest and /audio/transcribe/raw; audio_device on LoadRequest.

How

core/inference/audio_device.py normalises the preference to auto, cpu or gpu. Anything unrecognised falls back to auto, so an unknown value never fails a load.

All three audio stacks honour it through the CPU path each one already had for training:

Stack Mechanism
Transformers Whisper _pick_device returns cpu/float32
whisper.cpp --no-gpu
llama.cpp (mtmd) -ngl 0
Native audio TTS device chosen in the backend constructor

gpu is deliberately not offered in the UI. It differs from auto only on a machine with no accelerator, where it cannot be honoured anyway.

Two decisions worth review

A resident model under a different preference is reloaded, not reused. The preference is a request about placement, so serving from the old device would make the setting silently do nothing. The Transformers sidecar tracks the preference it loaded under and skips the resident-snapshot shortcut when replacing, since that shortcut answers without a path. A model loaded before this existed records no preference and is still reused, so nobody pays for a reload on upgrade.

A CPU TTS load skips the VRAM preflight. Nothing goes on the card, so there is no free memory to size, reserve or wait for, and sizing it anyway would refuse the load on a full GPU, which is precisely the case this option exists for. It is placed after the Python and adapter guards so those still apply. MiniMax Music 3 is still refused on CPU because its runtime needs CUDA, but the message now says CPU was chosen rather than implying the hardware is missing.

Tests

New tests/test_audio_device_preference.py, 22 cases covering normalisation, the environment default, CPU winning over a working CUDA, auto and gpu still detecting, the reload-vs-reuse rules, registry forwarding, and the native audio constructor.

I also widened several existing test stubs whose fake signatures were narrower than the real interface.

Checked against main so the pre-existing failures are not read as new:

  • audio selection: identical 9 pre-existing failures before and after
  • orchestrator/worker/load selection: identical 9 pre-existing failures, 1207 passing both ways
  • STT suites 133/133, new file 22/22
  • frontend typecheck clean, eslint count identical to baseline, strict i18n parity passes on all 12 locales, frontend audio/dictation tests 199/199

Not verified

I have not confirmed the two new controls visually in a browser. Everything else above is checked.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 31, 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-09-02T18:03:36.585305Z 389980d 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.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@shimmyshimmer

Copy link
Copy Markdown
Member Author

Found and fixed a real bug in the first version of this while re-checking it, worth flagging since it is exactly the kind of thing that would have bitten after merge.

I was reading device=None as auto, which made it a positive placement request rather than an absence of one. /v1/audio/transcriptions sends no device. So with CPU picked in Voice settings, an API transcription pulled the model back onto CUDA, and the next dictation pulled it off again: two full model reloads per alternation, plus the VRAM the user had explicitly asked us not to take.

None now means no opinion. It takes the server default for a fresh load and reuses whatever is resident otherwise, so only an explicit preference ever moves a model. All three sidecars had the same bug. The mtmd one now tracks the user's standing choice separately from _gpu_disabled, so training still drives its own restart when a run starts or ends.

Two regression tests cover both directions: a no-opinion call leaves the placement alone, and an explicit change still reloads after one.

Also worth recording the scope limit, which has not changed: this covers dictation on all three engines and the native audio TTS models. Audio models that load through the Unsloth backend instead (csm, bicodec, dac, snac, and Whisper via FastModel) still place automatically through device_map, and raise_if_offloaded there rejects CPU offload outright. Extending it to those means relaxing that guard, which felt like a separate change.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@shimmyshimmer

Copy link
Copy Markdown
Member Author

Went through all nine of these against the code rather than taking them at face value. Eight were correct and are now fixed; one I am pushing back on. Details below.

Fixed

Training guard (P1), GPU arbitration (P1), validate, and the already-loaded shortcut. These are one bug wearing four hats: the placement only ever reached the loader, so every guard above it still treated a CPU audio load as a GPU one. Confirmed each:

  • chat_load_needs_gpu = not (config.is_gguf and ...). Native audio is non-GGUF, so that is unconditionally true and acquire_for(CHAT) could cancel an image or video generation for a load that takes no VRAM.
  • _guard_chat_load_against_training never reads audio_device, and its diffusion branch refuses unconditionally.
  • ValidateModelRequest had no field, and validateModel in chat-api.ts did not send one.
  • The non-GGUF already-loaded path compares only _same_loaded_identifier and _mlx_runtime_settings_match.

All four now go through one _native_audio_cpu_load(config, request) gate. It is keyed on the audio type deliberately: audio_device is documented as ignored elsewhere, so without that a chat model could send it and walk straight past the training guard. For the shortcut, the orchestrator now records the placement it loaded under, so a CPU request against a resident GPU model reloads instead of reporting success.

MiniMax on CPU. Correct, and my earlier comment saying the backend handles it was wrong. The CUDA check lives inside _resolve(), which runs after the early return, so the failure landed in the worker after the switch had already evicted the resident model. Now refused in preflight.

GGUF TTS (P1). Correct. unsloth/orpheus-3b-0.1-ft-GGUF is in AUDIO_CATALOG, and audio_device does nothing for GGUF, so the control claimed RAM while llama.cpp offloaded as usual. CPU now translates to gpu_memory_mode: manual with gpu_layers: 0 for GGUF artifacts.

Deferred device changes. Correct. The control is disabled during a load, generation or recording, since the eject that applies it cannot run then.

Training eviction. Correct and worth fixing, since _pick_device already forces CPU during training, so the old code unloaded a CPU model only to reload it on CPU. The check is deliberately default-deny: anything unreadable is still evicted, because starving the run is a much worse failure than a needless reload.

Not taking

MTMD device change during an in-flight request. The behaviour is real, but the _active_requests branch is a deliberate existing policy, and its comment says so: restarting for offload mode is an optimisation, never worth killing a running transcription for. That reasoning holds more strongly here, not less. Training gets the same treatment and has a far better claim on the VRAM. It is also self-correcting: the server is released on its idle timer and the next load picks up the requested placement. Happy to revisit if you disagree.

Checks

Two new backend test files, 36 cases. I verified the guard tests actually fail without the fix rather than trusting a green run.

Broad sweep across stt, audio, mtmd, ggml, training_vram, validate, orchestrator and placement: 3518 passing, 10 failures all confirmed pre-existing on main. Frontend typecheck clean, eslint identical to baseline, 189 audio and dictation tests passing.

Still not verified: none of this has run on real CUDA hardware, and the UI controls have not been exercised in a browser.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@shimmyshimmer

Copy link
Copy Markdown
Member Author

Both of these check out, and both are now fixed.

Direct GGUF picks. Correct. exactGgufLoadSelector is ggufFilename ?? ggufVariant ?? null, and that null is what reaches the loader as ggufFilename, so gating the CPU translation on it skipped a direct .gguf file entirely: llama.cpp kept its normal offload while the control claimed system RAM. The gguf test now lives in one isGgufTtsTarget predicate that handleModelSelect and the loader share, so the two cannot drift, and it reads the load id too for a path-only pick. Unit tested, including that a repo merely containing the letters gguf does not match.

Worth noting the variant path was already covered: picking a quant sets ggufVariant alongside isGguf, so exactGguf is non-null there. The gap was specifically the direct file, as you said.

CPU native audio during training. Correct, and the precedent is three lines below the bug: the GGUF branch already skips a server whose _gpu_offload_active is False, with the comment that CPU-only GGUF holds no VRAM so killing it cannot help. The orchestrator branch had no equivalent. It now consults the audio_cpu marker for the same exemption. Deliberately conservative, matching the STT probe: an in-flight load has no recorded placement and a missing marker predates the option, so both are still torn down. Starving the run is a far worse failure than a needless reload.

Checks. 39 backend cases across the two new files, 51 in the audio policy suite, 191 frontend audio and dictation tests. Backend sweep over stt, audio, mtmd, ggml, training, training_vram, validate, orchestrator and placement: 6277 passing against 6274 on main, the difference being the three tests added here, with the same 29 pre-existing failures on both sides. Typecheck clean and eslint identical to baseline on the touched files.

Unchanged caveat: none of this has run on CUDA hardware, and the UI has not been exercised in a browser.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@shimmyshimmer

Copy link
Copy Markdown
Member Author

Both P1s are real, both were mine, and both are fixed. The first one is the worst thing in this PR so far.

Unbound config in the already-loaded shortcut. Correct, and worse than a placement bug: _load_model_impl starts at 13006, config was first assigned at 13271 by _resolve_config, and I read it at 13192, inline rather than inside a nested function. Every repeat /load of an ordinary safetensors model would have raised UnboundLocalError and returned a 500 instead of already_loaded. Nothing to do with audio at all.

The check now reads the resident entry rather than the requested config, which is both the thing it is actually deciding about and available at that point, so it needs no config. Proven by walking the function AST rather than by eye: before, first read 13192 against first assignment 13271; after, first read follows the assignment.

Worth saying plainly why this got through: there is no test anywhere for the non-GGUF already-loaded path. All 17 already_loaded references in the suite are GGUF. My earlier sweeps were green because nothing exercises it.

Over-broad audio_cpu marker. Correct, and the more dangerous of the two in production. The orchestrator wrote the marker from the request alone, so with UNSLOTH_AUDIO_DEVICE=cpu an ordinary chat load recorded it while the Unsloth backend still placed the model on the accelerator. _resident_audio_holds_no_vram trusted it and skipped the teardown, so training would start beside a VRAM-resident chat model and OOM.

The marker is now written only for a native audio result. I also gated the reader on the audio type, so both sides check it: a stale or wrong marker cannot reach that decision from either direction. That belt-and-braces is deliberate given the failure mode is an OOM rather than a slow load. Verified load-bearing by removing the gate and watching the new test fail.

Checks. 41 cases across the two files. Sweep over stt, audio, mtmd, ggml, training, training_vram, validate, orchestrator, placement, already_loaded, reload and reuse: 6549 passing against 6547 on main, the difference being the two tests added here, same 28 pre-existing failures both sides.

@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@shimmyshimmer

Copy link
Copy Markdown
Member Author

One of these I am declining, and checking it showed that a fix I made last round was built on the same wrong premise, so I have reverted that too.

In-flight CPU audio loads: declining, premise does not hold. The claim is that starting training "does not require reclaiming anything" from an in-flight CPU audio load. It does. core/inference/worker.py calls _hw.detect_hardware() at startup, before any placement decision and unconditionally for native audio workers, and that reaches torch.cuda.get_device_properties(0), which initialises a CUDA context. The process holds VRAM whatever the weights end up on, so a "provably CPU-only startup" is not provable here.

And that retracts my previous change. The last round's comment made the same argument for the resident case, I accepted "it holds no VRAM" without checking, and it is wrong for the same reason. Rather than keep the exemption with a caveat, I have removed it: the failure mode is training OOMing, and a needless model reload is the much cheaper mistake. Chat-backend teardown is back to what it was before this branch.

The STT sidecars keep their exemption, and I checked rather than assumed: stt_transformers_worker.py contains no reference to torch.cuda, detect_hardware, or any device probe. It imports torch and moves the model to the device it was handed. A CPU load there genuinely costs no VRAM. The GGUF branch keeps its own pre-existing exemption for the same class of reason.

Placement stated as fact: correct, fixed. audio_cpu is only read by the load route; nothing puts it in /status. So with a model loaded by another tab or a headless client on the other device, the help text asserted something the frontend cannot know. I have not added a reload on mismatch, since silently reloading another client's model because this tab's persisted preference differs seems worse than the problem. The text now describes what the next load will do, which is true regardless of who loaded what.

A correction to my own earlier numbers. I have been saying "same failures as main". My baseline runs used git stash, which only removes uncommitted work, so they were really comparing against the branch tip. That is the right comparison for catching a given round's regressions, but it is not main, and I should have said so. I have now run main properly in a separate worktree: 28 failed, 6507 passed. This branch: 28 failed, 6545 passed, the same 28 failures with +38 from the tests added here. The conclusion stands, but it is now actually measured.

37 cases across the two files after removing the four that covered the reverted exemption. Frontend typechecks, builds, 157 audio tests passing.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@shimmyshimmer

Copy link
Copy Markdown
Member Author

Correct, and fixed.

The unload API takes (engine, model) for exactly this race, and its own docstring describes it: another surface can switch the same engine between the ownership check and the request arriving. I confirmed the backend honours it rather than assuming, WhisperSttSidecar.unload calls _holds_expected_model under _lock before releasing, and that comparison runs the claimed id through resolve_model_id, so passing the stored id matches a resident normalised one. The Audio page already passes both. The device change now does too, which is also what it means: moving this tab's placement should not evict someone else's model.

Two details I checked while doing it. Passing the nominal engine is fine, since the route maps it through _resolve_serving_stt_engine, so a "gguf" pick actually served by the Transformers fallback still targets the right sidecar. And if the resident model is on a different engine entirely, the scoped unload correctly leaves it alone: this tab's next load goes through stt_registry.load, which releases the other engines itself, so nothing is stranded.

I have deliberately left the three other unloadSttModel() calls in this file unscoped. The engine switch and the Unload button both mean "free whatever is resident", and that is the documented behaviour of a call with no engine: "Without an engine, both sidecars unload so an engine switch in Voice settings always frees whichever backend was resident." Scoping those would change existing behaviour beyond this PR.

New test in the source-assertion style this repo already uses for component behaviour, covering the scoped unload and the two places the device preference has to travel. Verified load-bearing by reverting the scoping and watching it fail. Typecheck clean, eslint clean on the file, 204 frontend audio, dictation, stt and voice tests passing.

Also noting #10055, the download icon change, merged.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: b7ec47a062

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

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@shimmyshimmer

Copy link
Copy Markdown
Member Author

Rebased onto main and the conflicts are resolved. Squashed to one commit first so the resolution happened once rather than thirteen times.

Three conflicts, all in code main had refactored underneath this branch:

  • _load_model_impl's already-loaded condition picked up _non_gguf_runtime_settings_match and then _resident_context_satisfies. Both are independent of the placement check, so all of them are kept.
  • The orchestrator's model entry moved into _mirrored_model_entry. The audio_cpu field is now set after that call rather than inside it, since it records the parent's own request rather than something the worker reports back. I checked that main's new max_seq_length_requested and load_in_4bit_requested keys survived; they are written in the route, so they were never at risk.

The full suite then turned up a real regression, which is worth spelling out because a targeted run would have missed it. test_a_cpu_only_chat_load_does_not_take_the_gpu_arbiter pins the literal chat_load_needs_gpu = not (, and my edit had made it not _native_audio_cpu_load(...) and not (. The behaviour was right, and in fact extended in exactly the direction that test protects, but the contract it pins was broken. Rewritten as one negation over a disjunction, which keeps the literal, reads better, and preserves the short-circuit so zero_vram_chat_load is still skipped for a CPU audio load. Equivalence checked over all eight truth assignments, since and binding tighter than or is doing real work there.

On whether this touches anything else, measured rather than asserted. Full backend suite both sides, 38k tests: exactly one test failed on this branch and not on main, the one above, now fixed. Two failed on main and not here, both in test_orphaned_children, and they flip between runs, so they are flaky and unrelated. The other 326 are identical on both sides.

I also exercised the two functions that now run on paths non-audio loads take. _resident_audio_placement_matches is in the already-loaded condition for every non-GGUF load: it returns True, preserving today's behaviour, for no resident model, a missing entry, a plain chat model, a legacy audio entry with no marker, and for whisper, csm and other Unsloth-path audio types. _native_audio_cpu_load returns False for every one of those even with audio_device=cpu, so nothing else can reach the guard exemptions. PillTabs gained an optional disabled prop defaulting to false; four of its five call sites are untouched.

After the fix: 7594 passing in the audio, training, placement, context and arbiter sweep, with no failures outside main's known set. Frontend typechecks, builds, strict i18n parity passes, 208 audio, dictation, stt and voice tests pass.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@shimmyshimmer

Copy link
Copy Markdown
Member Author

Went through the latest round of comments. Six were right and are fixed; one is real but predates this branch, so I left it alone and explained why.

Fixed

Post-load ownership check unloaded the model it had just loaded (the severe one). In the non-GGUF path the check was a bare if current_owner() != CHAT:. Since a CPU audio load no longer takes the arbiter, the owner is None on a clean server, so the branch unloaded the model, killed its subprocess and returned 409. That broke CPU native-audio loads outright, and it was my own regression from the arbiter change. It is now gated on chat_load_needs_gpu, matching what the GGUF branch at the equivalent point already did. Every GPU-bearing load still reaches the guard.

Already-loaded branch took the arbiter unconditionally. Repeating a load of a resident CPU-placed audio model called acquire_for(CHAT) and cancelled a running image or video generation for a model holding no GPU. Now gated by _resident_audio_holds_no_gpu, mirroring the holds_no_vram check the GGUF branch uses. config is not in scope at that point, so the helper reads the resident entry, behind the same audio_type gate as the writer.

CPU GGUF audio loads still declared as GPU-bearing. The load sent gpu_memory_mode: "manual" and gpu_layers: 0 but no speculative_type. zero_vram_chat_load resolves an absent mode to "auto", not "off" (its docstring calls out that grouping the two was a past bug), so the load was read as GPU-bearing and evicted media pipelines anyway. It now sends speculative_type: "off".

The worker took a CUDA context regardless of placement. detect_hardware() runs before the backend is constructed and calls torch.cuda.get_device_properties, so a "CPU" load still held a few hundred MB. Placement alone never made "holds no VRAM" true, which is what the two fixes above rely on. The worker now masks CUDA_VISIBLE_DEVICES and HIP_VISIBLE_DEVICES before detection, using the same values and for the same HIP reason as the CPU embed server in core/rag/embed_llama_server.py. ROCR is deliberately left alone, and XPU is not masked since its probe takes no context.

mtmd dropped the device choice on the training-pinned reuse branch. With training active, an explicit cpu produces training == _gpu_disabled, so the early return fired and _forced_cpu was never recorded. The next device-less load then read the stale preference and put the model back on the GPU once training ended. The reuse branch now records the choice even though nothing restarts.

Switching the dictation device could kill a live transcription. The unload defaulted to wait=True, which drains the sidecar for 30s and then releases it anyway, losing the recording. That release is only an early one, since the next load applies the setting regardless. wait is now threaded through the route and unload_stt_model (the registry already had it), and the Voice device switch passes wait: false. The default is unchanged everywhere else.

I also corrected a comment in training_vram.py that the masking fix had made inaccurate. The conservative behaviour there is unchanged on purpose: a forced-CPU worker genuinely holds nothing now, but the exemption would key off a marker the orchestrator writes rather than off the worker that did the masking, and a marker that ever disagreed would be an OOM mid-training. Freeing a model that held no VRAM only costs a reload.

Not fixed, and why

STT auto placement is not re-evaluated after training ends. This is real, but it is not from this branch. On main the reuse check is self._engine is not None and self._model_id == model_id; this branch ANDs an extra placement condition onto it, which can only make reuse stricter, never looser. So a model that went to CPU under auto during training is reused afterwards exactly as it was before this change. Worth fixing, but it belongs in its own change rather than being folded in here.

Verification

Every fix has a test that fails on the pre-fix source and passes after; I checked that both directions rather than just the passing one. The eight new guard tests, plus the mtmd and unload ones, were each run against stashed source to confirm they were not vacuous.

One existing test in test_gpu_arbiter.py pinned the old bare if current_owner() != CHAT: literal. I updated it to the gated form rather than around it, since its intent (a safetensors load yields a GPU it lost while loading) still holds for every GPU-bearing load.

Full backend suite on this branch and on origin/main, same interpreter, same flags: 313 failures each, 312 identical. The single difference is test_orphaned_children.py::test_forgetting_a_leader_keeps_its_live_group, which is load-dependent, covers subprocess reaping, and passes in isolation on both sides; run on its own, both branches fail the identical unrelated pair. Frontend: 6348/6348 pass, tsc --noEmit clean, strict i18n parity clean, and eslint reports the same 18 pre-existing problems on the touched files before and after.

Standing caveats unchanged from earlier: none of this has run on CUDA hardware, so the masking path in particular is verified by source and by the precedent it copies rather than by execution, and I have not exercised the UI in a browser.

@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

chatgpt-codex-connector[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

… does not need

Three placements a CPU RAM audio load still got wrong.

The GGUF codec now loads on CPU, but decoding still asked for CUDA
whenever a card existed. The decoders build their input tensors on the
device they are handed, so SNAC and DAC failed on a device mismatch and
BiCodec moved the codec onto the card, taking the VRAM the mode exists to
avoid. The codec manager records where each codec actually went and
decoding follows it. That also covers the reuse case, where a codec
already resident from an earlier load never moves to the device a later
request asked for.

Releasing the CHAT claim before the load left a still-resident GPU model
unowned, and acquire_for evicts nobody when the arbiter has no owner, so
an Images or Video load could allocate straight over it. The release is
now handed to load_model, which runs it once the previous worker has
exited and its memory is back: after the danger, still ahead of the
download that made holding the claim untenable. A worker that will not
exit keeps the claim, which is then telling the truth.

The export teardown ran unconditionally to free VRAM for the incoming
model. A CPU load masks the accelerators and wants none of it, so this
was killing a running export for nothing.
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 2, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 2, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 2, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 2, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 2, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 2, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 2, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 2, 2026
chatgpt-codex-connector[bot]

This comment was marked as resolved.

…alog's GGUF answer

Two ways a CPU RAM choice still ended up on the GPU.

whisper.cpp chose between GPU and --no-gpu before publishing _loading.
The training hook reads is_loading() without that method's lock, so a
switch from a CPU-resident model to Auto landing in that window was
invisible to a training run starting concurrently: training saw no load
in flight, read the outgoing model's CPU placement, preserved it as
holding no VRAM, and the command already built then started a GPU-backed
server beside the run. The decision now happens after the flag is
published, where the hook cancels the startup and waits for it to settle.

The Audio picker identifies some GGUF repos only from the catalog, when
no exact variant exists and neither the repo id nor the load id spells
gguf. That answer was recomputed from the ids alone at load time and lost,
so a CPU RAM load of one omitted gpu_layers: 0 and speculative_type off,
and the backend, which ignores audio_device for GGUF, put it on the card.
The catalog's answer now travels with the load through both queue points
and both staged replays.
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 2, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 2, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 30e3930793

ℹ️ 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. Keep it up!

Reviewed commit: a6e049f153

ℹ️ 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 Sep 2, 2026
Measured both sides on the same build. This branch's merge base comes in at
1,560.9 KB transfer, 1.6 KB under the old 1,562.5 KB ceiling; the branch comes
in at 1,562.6 KB. The control costs about 1.7 KB of startup transfer and the
headroom left was 1.6 KB, so it went over by a tenth of a kilobyte.

What actually reaches the first screen is small and none of it is deferrable:
the new control's en strings, its persisted voice-settings preference, and the
pill-tabs variant. The Audio page and the Voice settings tab are both already
split out of the entry, so the page itself costs nothing until it is opened.

Raw is untouched, with 126.7 KB still to spare.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: efa3cd5bd6

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

Two sweeps over the 269 comment lines the branch introduced, down to 132.
Section banners and restatements deleted outright; multi-line rationales
collapsed to the fact that keeps someone from reintroducing the bug.

What survives names a specific mistake: the ordering the whisper.cpp
loading flag depends on, why the CHAT claim is dropped mid-load rather
than at either end, why the export teardown is gated, and why decoding
follows the codec's recorded placement.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@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: 389980df5e

ℹ️ 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 +1146 to +1148
<Select
value={sttDevicePreference}
onValueChange={(value) => {

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 Disable placement changes while an external STT load is running

When another tab or API client is currently loading this same model, this control remains enabled and the wait: false unload cannot acquire the sidecar lock, so it silently leaves that load running. The handler nevertheless persists the new preference and marks the model on-demand; once the old load finishes, the status poll accepts it as ready without checking placement, leaving a GPU model resident after the user selected CPU until another transcription triggers a reload. Disable the control while the reported sidecar is loading, or arrange a follow-up unload/reload after that load settles.

Useful? React with 👍 / 👎.

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