Instructions to use OzzyGT/sheetsage2_diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use OzzyGT/sheetsage2_diffusers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("OzzyGT/sheetsage2_diffusers", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
SheetSage2 Diffusers
The YuE2 sample song, turned into the score below with the code below.
Diffusers version of m-a-p/SheetSage2 with its MERT-v2-FullSong encoder: it listens to a song and writes its lead sheet (melody, chords, beats, key and sections) as an ABC score. This repository holds only weights and configs: run it with the blocks in OzzyGT/sheetsage2_custom_blocks, which ship the model code.
Note: reading audio files needs FFmpeg.
Licensing
The weights are CC BY-NC 4.0 (non-commercial), from m-a-p; see LICENSE.
Sample score
import torch
from diffusers import ModularPipelineBlocks
blocks = ModularPipelineBlocks.from_pretrained("OzzyGT/sheetsage2_custom_blocks", trust_remote_code=True)
pipe = blocks.init_pipeline()
pipe.load_components(dtype=torch.float32)
pipe.to("cuda")
state = pipe(audio="city_lights.mp3") # task="melody" leaves the chords out
print(state.get("abc"))
The start of the score:
X:1
T:
M:4/4
L:1/32
Q:1/4=84
V: Vocal clef=treble name="Vocal Melody" snm="Vocal"
V: Ins clef=treble name="Ins Melody" snm="Inst."
K:C
% intro
V: Vocal
z24z4"C"z4|"C"z32|"Em"z32|"F"z32|
V: Ins
z24z4G2G2|c4G4c4G4c4G4c2d2e4|B4G4B4G4B4G4B2c2d4|A8A8A8A8|
...
% verse
V: Vocal
"C"z8e2e4e6d2d6c2d2-|"Em"d6z24z2|"Am"z8c2d4e6d2d6c2A2-|"F"A6z24z2|
The score works with YuE2: give it as abc to sing the same melody in a new style.
- Downloads last month
- -
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support
Model tree for OzzyGT/sheetsage2_diffusers
Base model
m-a-p/MERT-v2-FullSong