minimax-music RVQ branch: precompute + tests import model_cards/collection/minimax_music3_reference_adapter.py which is not in the repo
Summary
On branch script/train-minimax-music-rvq-encoder, both scripts/minimax_music3/precompute_rvq_codes.py and tests/test_minimaxmusic_reference_adapter.py import minimax_music3_reference_adapter from a model_cards/collection/ directory that is not in the repository (never tracked on any branch, not mentioned in docs):
sys.path.insert(0, str(args.collection_dir))
from minimax_music3_reference_adapter import MiniMaxMusic3ReferenceAdapter
The open-rvq-encoder-minimax-music3-169m-v4 README confirms "a packaged from_pretrained loader is not present yet" and points at the classes in scripts/train_minimax_music_rvq_encoder.py — but the adapter wrapper the tooling actually imports (from_pretrained, predict_codes, replay_codes_diffusers, frame_latent_starts, build_pool_matrix, per the test contract) appears to exist only locally on your machine.
Ask
Could you publish minimax_music3_reference_adapter.py (in-repo under model_cards/collection/, or attached to the HF encoder repo)? It is the only missing piece between a fresh checkout of the branch and a working LM-LoRA dataset pipeline — everything else (branch, encoder weights, precompute, example configs, quickstart) works as documented.
Context: we're following your MiniMax Music 3 LM-LoRA path (fiona-crapple reproduced and verified on our side; the DiT-side community trainer's adapters measure as inference-inert for the reasons your language_model approach avoids — happy to share that analysis if useful). Reconstructing the adapter from the test contract is our fallback, but the reference implementation would keep code-space conventions (frame pooling, candidate handling) exactly aligned with your published encoder evaluation.
Thanks for the encoder work — the replay-comparison evaluation in the HF repo made it possible to assess fidelity before committing GPU time, which is rare and appreciated.
AI-assisted investigation; happy to test whatever you publish within hours.
Update — partially resolved, ask narrowed.
Found it: the adapter IS published, in the collection repo SimpleTuner/open-rvq-encoder-minimax-music3 (we were looking in the versioned checkpoint repos). Apologies for the noise on that half.
The remaining (small) discrepancy: the branch's scripts/minimax_music3/precompute_rvq_codes.py is written against a newer adapter revision than the published one — it calls
adapter.predict_codes(waveform, sample_rate, device=device, offload_after=False)
while the published signature is predict_codes(self, waveform, sample_rate, *, device=None, encoder_dtype=None) — so a fresh checkout raises TypeError: unexpected keyword argument 'offload_after'.
Either publishing the newer adapter revision or dropping the kwarg in the script fixes it. Local workaround that stays forward-compatible:
try:
codes = adapter.predict_codes(waveform, sample_rate, device=device, offload_after=False)
except TypeError:
codes = adapter.predict_codes(waveform, sample_rate, device=device)
Everything else on the branch works from a fresh checkout as documented. Thanks again — the collection packaging (adapter + all four encoder variants + ComfyUI nodes + aggregate eval) is excellent.
thanks for the report, refactored things and included the script in this repo too, not just the open rvq encoder one
Confirmed and thanks for the fast turnaround! For what it's worth: using the collection-repo module in the meantime, the full path worked end to end on our side — two LM LoRA runs (v4 and MERT-aligned encoder codes, 9 tracks each) both produced voice adapters that carry identity through stock inference, with the caption Harmony field even steering ad-libs at generation time. The teacher-forced precache work in 5ff9274 looks like exactly the missing piece for DiT-side training on this model — looking forward to trying LM+DiT stacking when it lands.