Model reference · open weights

SheetSage2

Embeddings m-a-p Embeddings 1 build Non-commercial 2k dl/mo

SheetSage2 is an open-weight embedding model from m-a-p. SheetSage2 (FP32) weighs 114 MB; the smallest configuration that runs it is RTX 3060 12 GB.

For self-hosting, compare this build's requirements below with the GPU you plan to rent.

  • SheetSage2 is a 57M parameter feature-extraction model by m-a-p that transcribes music recordings into lead sheets, MIDI files, and timed musical annotations.
  • Built on MERT-v2-FullSong, it outputs editable ABC scores, separate melody and chord tracks, and piano previews.
  • The model is licensed under CC BY-NC 4.0.

Summary of the m-a-p/SheetSage2 model card, 2026-10-01

What it is

Released bym-a-p
Released2026-09-09
Parameters57M
VRAM114 MB for the weights

What it runs on

Memory and cards for SheetSage2 (FP32)

114 MBweights, file size
1.1 GBruntime overhead
CardRunsMemory
RTX 3060 12 GBfits11.6 GB
RTX 4060 Ti 16 GBfits15.4 GB
RTX 3090 24 GBfits23.4 GB
RTX 4090 24 GBfits23.4 GB
RTX 5090 32 GBfits31.0 GB
L40S 48 GBfits44.0 GB
A100 80 GBfits78.2 GB
H100 80 GBfits78.1 GB
RTX PRO 6000 Blackwell 96 GBfits93.8 GB
DGX Spark (GB10) 128 GB unifiedfits107 GB
H200 141 GBfits138 GB
B200 180 GBfits176 GB

From the model card

What m-a-p says about SheetSage2

Read the model card

· · ·            

SheetSage2 turns music recordings into lead sheets and timed musical annotations. Transcribe a complete song, edit its ABC or MIDI, render a piano preview, or extract embeddings and token predictions for your own tools.

Built on MERT-v2-FullSong, with adapters that merge automatically when you load the model.

🚀 Quick start

Use Python 3.10 or 3.11 and FFmpeg 6.1 with its shared libraries. Sign in with access to this repository and its MERT-v2 parent:

python -m pip install huggingface-hub==0.36.0
huggingface-cli download m-a-p/SheetSage2 --local-dir SheetSage2
cd SheetSage2
python -m pip install torch==2.8.0 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cu126
python -m pip install -r requirements.txt
import torch
from transformers import AutoModel

model = AutoModel.from_pretrained(
    "m-a-p/SheetSage2", trust_remote_code=True,
).eval().to("cuda" if torch.cuda.is_available() else "cpu")

result = model.transcribe("song.mp3", output_dir="output")

Files are decoded, mixed to mono and resampled automatically. Long songs use overlapping windows.

OutputFile
Editable scorescore.abc
Melody and chord accompanimenttranscription.mid
Separate melodies and chordsmelody_vocal.mid, melody_instrumental.mid, chords.mid
Timed annotationsevents.json, *.lab

Omit output_dir to keep results in memory. Pass a Tensor or NumPy waveform with its sample rate:

# waveform: [samples] or [channels, samples]
result = model.transcribe(waveform, sampling_rate=24000)
abc = result["abc"]        # str
midi = result["midi"]      # bytes
events = result["events"]  # list of timed events

Paths, encoded audio bytes and binary streams are also accepted. result["midis"] contains the separate MIDI parts; result["labs"] contains annotation text. Request export_logits=True, export_scores=True or export_embeddings=True for CPU tensors in result["tensors"], grouped by window; add output_hidden_states=True for all 24 MERT layers. With output_dir, these tensors are saved as safetensors instead. Low-level forward() returns logits and optional hidden states; generate() returns symbolic tokens.

Save a self-contained model for offline use:

model.save_pretrained("sheetsage2-local")
model = AutoModel.from_pretrained(
    "sheetsage2-local", trust_remote_code=True, local_files_only=True,
)

Melody-only ABC for covers

Set melody_only=True to retain both the Vocal and Ins melodies while omitting chord symbols from the ABC and chord accompaniment from playback/combined MIDI. Raw predicted annotations remain available; the default full transcription is unchanged.

result = model.transcribe("song.mp3", output_dir="cover-score", melody_only=True)
abc = result["abc"]  # Also saved as cover-score/score.abc.
python infer.py song.mp3 --output cover-score --melody-only

Review the transcription, then pass result["abc"] or the saved cover-score/score.abc to YuE2 as abc, with cot="melody" and your target style and lyrics. If the requested ABC cannot be produced, Python raises an error (partial results are available as error.result) and the CLI exits with a nonzero status.

Command line and rendering

python infer.py song.mp3 --output output

# Optional piano audio and printable sheet music:
python setup_render.py
python infer.py song.mp3 --output output --render-audio --render-score

# Render existing results without loading the model:
python render.py --input output --output rendered --audio --score pdf,svg,png

On minimal Linux servers, use python setup_render.py --with-deps. Audio follows the original MIDI timing. Scores preserve the vocal and instrumental staves. For separate piano previews, use --render-parts vocal,instrumental,chords with infer.py, or --parts vocal,instrumental,chords with render.py.

Python also accepts render_audio=True, render_score="pdf,svg,png". In memory mode, result["rendered"] contains audio (part → WAV bytes) and score (format → pages as PDF/PNG bytes or SVG text).

📊 Benchmarks

Scores (%) on H800 with BF16 inference; higher is better. Use preset="paper" or --preset paper with the dataset prompts in scores and settings.

TaskDatasetMetricSheetSage1madmomSpecialistSheetSage2
BeatGTZANF185.7985.7988.75 Beat This!85.65
Beatosu2017F191.5591.5588.18 Beat This!92.29
DownbeatGTZANF164.3364.3378.28 Beat This!79.51
Downbeatosu2017F183.2283.2284.99 Beat This!91.97
KeyGiantStepsWeighted43.8974.6272.09 [S-KEY][key]77.73
KeyGTZANWeighted54.5672.0574.43 [S-KEY][key]75.77
Chordosu2017Maj/min79.8277.4284.59 [Jiang et al.][chord]90.08
ChordChords1217Maj/min72.9883.52*84.09† [ChordFormer][chordformer]83.81
StructureHarmonixSetAccuracy——80.03 [SongFormer][structure]80.51
StructureHarmonixSetF1 @ 0.5 s——70.63 [SongFormer][structure]67.96
StructureHarmonixSetF1 @ 3 s——79.50 [SongFormer][structure]82.86
MelodyRWC-PopVocal F162.71—62.71 [SheetSage1][sheetsage]82.51
MelodyRWC-PopFull F164.02—64.02 [SheetSage1][sheetsage]75.29

Melody F1 uses pitch classes. SheetSage1 beat/downbeat results use madmom. *The madmom chord model includes Chords1217 in training. †ChordFormer uses five-fold cross-validation; SheetSage2 uses one checkpoint across all tracks.

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms