Skip to content

fix(vocal-split): say when Lead + Backing could not be made - #834

Merged
thcp merged 2 commits into
big-releasefrom
fix/vocal-split-silent-fallback-832
Oct 22, 2026
Merged

thcp merged 2 commits into
big-releasefrom
fix/vocal-split-silent-fallback-832

Conversation

@thcp

@thcp thcp commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

Closes #832

Likely cause on the reporter's install: the Linux CPU package shipped a CUDA torchvision (#778, fixed in 0.21.0). This PR fixes the second bug it exposed: a failed split ended with one Vocals stem and no word about it.

What changed

  • Failure codes: the worker reports the failed step; the job keeps vocal_split_reason (persisted) plus a fixed safe vocal_split_message. The failed request's 500 body carries the same. No stderr, path or traceback reaches the client.
    • dependency_missing, model_unavailable, out_of_memory, worker_failed, timeout, cancelled, interrupted
  • Notice: Lead + Backing could not be made, why in one line, and Try again (same vocal-split endpoint, same song, no re-import). Notification card keeps it. Cancel shows nothing.
  • Stems popover and Karaoke say why, also after a restart.
  • Startup visibility: warmup and real splits record the outcome; /api/health reports vocal_split {available, reason}. A missing dependency shows Lead + Backing off with its reason (Extract row, popover split, Karaoke Separate), like OGG without libvorbis. Tied to package versions, so the CPU-only Linux package ships the cu124 torchvision wheel: warmup fails with "operator torchvision::nms does not exist" #778 repair or an update turns it back on.
  • A record saved mid-split restores as error/interrupted instead of running (which 409'd forever). A cancel applies only to its own run, including one waiting for the pipeline lock.
  • i18n in all ten tables, Guide row for Try again, spec-map rule.

What did not change

  • Separation model, Demucs worker, packaging, uv.lock.
  • Mobile UI keeps its existing toast.
  • The split intent is still client-side only: an import queued with Lead + Backing loses it if the page reloads before the job finishes (not fixed here).

Tests

  • pytest: every failure class through the real worker and endpoint, restart, retry, capability, warmup.
  • Playwright vocal-split-failure.spec.mjs: notice, Try again, cancel, popover reason, disabled and enabled option.
  • Local: pytest 3440 passed; full Playwright 719 passed, 5 failed (trash-restore x3, streamer-media, grid-value-box: known on big-release).

Risks

  • Worker error line is now a JSON object; the parent still reads the old string form.
  • Classification is by phase plus text patterns; a crash with no error line falls back to text and may misread.

thcp added 2 commits October 22, 2026 12:40
A failed split left the song done with one Vocals stem, a bare 500 and
vocal_split "error", so nothing could say what went wrong.

- The worker reports a code with its error line, from the step that
  failed: dependency_missing, model_unavailable, out_of_memory,
  worker_failed. The parent adds timeout and cancelled.
- The job keeps vocal_split_reason (persisted) and to_state carries a
  fixed safe sentence, vocal_split_message. No stderr, path or
  traceback reaches the client.
- A record saved mid-split restores as error/interrupted, not a
  "running" that refused every retry with 409.
- A cancel only applies to the run it was sent to, including one still
  waiting for the pipeline lock.
- Setup warmup and real splits remember the outcome in the data
  folder; /api/health reports vocal_split {available, reason},
  unavailable only for a missing dependency on the same package
  versions, so the #778 repair or an update switches it back on.
Choosing Lead + Backing and getting one Vocals stem used to say nothing.

- A failed split shows a notice: Lead + Backing could not be made, why
  in one line from the server's code, and Try again, which runs the
  same vocal-split endpoint on the same song (no re-import, same queue
  and cancel behaviour). A card in the notification centre keeps it.
  A cancel shows nothing.
- The Stems popover and Karaoke's Separate say why too, including for a
  song whose last split failed before a restart.
- /api/health vocal_split: when a dependency is missing, Lead + Backing
  in the Extract row, the popover's split and Karaoke's Separate are
  shown off with the reason, like OGG without libvorbis. Imports then
  ask for Combined; the saved choice comes back once it is available.
- Strings in all ten tables (plus pt-PT where it differs), a Guide row
  for the new Try again, a Playwright spec and a spec-map rule.

Closes #832
@thcp
thcp marked this pull request as ready for review October 22, 2026 16:48
@thcp
thcp merged commit f8b028d into big-release Oct 22, 2026
19 of 20 checks passed
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.

1 participant