Skip to content

Migrate BS-RoFormer to model spec v1 - #142

Merged
0xShug0 merged 1 commit into
0xShug0:mainfrom
mirek190:agent/bs-roformer-model-spec-v1
Jul 28, 2026
Merged

Migrate BS-RoFormer to model spec v1#142
0xShug0 merged 1 commit into
0xShug0:mainfrom
mirek190:agent/bs-roformer-model-spec-v1

Conversation

@mirek190

Copy link
Copy Markdown
Contributor

Summary

Migrates BS-RoFormer to the current schema-v1 model-spec architecture described in #128 without changing the shared Mel-Band RoFormer interface.

  • makes model_specs/bs_roformer.json the single source of truth with schema_version: 1, typed metadata/options, package/UI hints, and GGUF/safetensors resources
  • removes the duplicate model_specs_v1/bs_roformer.json
  • moves only make_bs_roformer_loader() to the generic spec-backed loader path beside the shared session
  • passes the BS-RoFormer ModelContract into shared RoFormer session construction and validates bs_roformer.* session keys against it
  • keeps bs_roformer.weight_type and bs_roformer.num_overlap as the public namespaced session interface
  • deliberately retains the existing custom Mel-Band RoFormer loader and its current behavior
  • does not change RoFormer graphs, weights, overlap-add math, Flash Attention, or output samples

Shared-loader handling

BS-RoFormer and Mel-Band RoFormer share assets/runtime/session source files. This migration is additive: the generated registry includes the existing Mel-Band loader factory from loader.h and the new BS schema-backed factory from session.h. The old BS factory is removed from the custom loader, avoiding duplicate registration while leaving Mel-Band intact.

Validation

  • based on current main (c0d1c9f)
  • Windows MSVC Release custom composite build: AUDIOCPP_MODEL_SET=custom, AUDIOCPP_MODELS=bs_roformer, target audiocpp_cli
  • existing standalone BS-RoFormer ep368 Q8 GGUF inspection: passed; v1 metadata and both session options exposed
  • real 8-second stereo CPU separation with Q8 GGUF and bs_roformer.num_overlap=1: passed; generated vocals.wav and instrumental.wav in 20.120 s session time
  • existing Mel-Band RoFormer Q8 GGUF inspection: passed; only its unchanged mel_band_roformer.weight_type interface is exposed
  • loader catalog self-tests: passed
  • loader/catalog synchronization: passed with the pre-existing legacy model-manager warning for BS-RoFormer
  • git diff --check: passed

No model output or performance behavior is intentionally changed by this migration.

@mirek190
mirek190 marked this pull request as ready for review July 28, 2026 19:05
@0xShug0
0xShug0 merged commit 31960c4 into 0xShug0:main Jul 28, 2026
4 checks passed
@0xShug0

0xShug0 commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Thanks @mirek190, all three PRs have been merged!

mpulukkinen pushed a commit to mpulukkinen/audio.cpp that referenced this pull request Aug 2, 2026
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.

2 participants