Home

dev / openkara

publicthedavidweng/OpenKara· sync paused
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

perf(separator): bounded-memory streaming separation with OLA ring buffers (#176)

2 months ago

c3eebe1
Authored
Davy7/24/2026, 11:38:33 PM
* chore: rebase bounded separation onto current main

* chore: apply final bounded separation correction

* fix(separator): require named two-stem outputs

* chore: retrigger CI after separator correction

* chore: restore runtime fixture in streaming tests

* test(separator): initialize runtime in streaming inference tests

* chore: retrigger CI after runtime fixture correction

* fix(separator): keep short audio on one inference window

* fix(separator): align reported chunk totals with the streaming loop

The long-input chunk total undercounted the streaming loop iterations
(step_by covers every hop start, not just the coverage minimum), so
on_chunk_complete could exceed the reported total and push progress past
the stage bound. chunk_schedule now derives the total directly from the
loop schedule.

Also extracts classify_output_contract from detect_output_contract and
adds the regression tests requested in review: generic output_0/output_1
two-output models are rejected, named vocals/accompaniment bundles are
accepted, and short audio stays on one inference window.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

Parent030053c

13 files changed
  • docs/references/contracts/separation.md+15−12
  • src-tauri/src/audio/encode.rs+173−1
  • src-tauri/src/cache/stems.rs+53−129
  • src-tauri/src/separator/checkpoint.rs+0−238
  • src-tauri/src/separator/inference.rs+939−526
  • src-tauri/src/separator/job.rs+173−14
  • src-tauri/src/separator/mix.rs+0−88
  • src-tauri/src/separator/mod.rs+2
−2
  • src-tauri/src/separator/ola.rs+396−0
  • src-tauri/src/separator/workspace.rs+351−0
  • src-tauri/tests/phase3_inference.rs+129−57
  • src-tauri/tests/phase3_mix.rs+0−68
  • src-tauri/tests/phase3_stems_cache.rs+210−75