Audiofool commited on
Commit
0a199f0
·
verified ·
1 Parent(s): d96e2ad

Update Meric model card for the prepared code release

Browse files
Files changed (1) hide show
  1. README.md +114 -50
README.md CHANGED
@@ -1,96 +1,160 @@
1
  ---
2
  license: other
3
- license_name: stabilityai-community
4
- license_link: https://huggingface.co/stabilityai/stable-audio-open-1.0/blob/main/LICENSE.md
5
  base_model:
6
  - stabilityai/stable-audio-open-1.0
 
7
  pipeline_tag: text-to-audio
8
  tags:
9
  - music-generation
10
- - multimodal
11
  - image-to-music
12
- - text-to-music
13
  - video-to-music
14
- - diffusion
15
- - flow-matching
16
  - cross-modal-retrieval
17
- - MuQ
 
18
  library_name: meric
19
  ---
20
 
21
- # MERIC — Unified Multimodal Music Generation and Retrieval
22
 
23
- MERIC generates music from **images, text, and video** — and retrieves music for the same inputs — within a single framework, built around a **music semantic anchor** (the MuQ embedding space) that decouples *multimodal understanding* from *acoustic synthesis*.
24
 
25
- - **Stage 1** maps any modality into the anchor space: image/text → Qwen3-VL embedding `[2048]` (primary) or CLIP ViT-H-14 `[1024]` (alternative) → a "Music Head" (RDM diffusion, ~20 steps) → MuQ `[512]`.
26
- - **Stage 2** renders the anchor into 44.1 kHz audio: MuQ `[512]` → DiT + Flow Matching (~50 steps) → Oobleck VAE → audio.
 
27
 
28
- Decoupling the two stages lets Stage 2 train on large **unpaired** music corpora, model the inherent **one-to-many** nature of cross-modal generation by sampling in anchor space, and serve both **generation and retrieval** from one model.
 
 
 
29
 
30
- > Code: [github.com/TODO/meric](https://github.com/TODO/meric) · Paper: *MERIC: Unified Multimodal Music Generation and Retrieval via a Music Semantic Anchor* (ECCV 2026)
31
 
32
- ## Files in this repository
 
33
 
34
- | File | `meric` model name | Description |
35
- |---|---|---|
36
- | `rdm_sft_v3.pth` | `meric-sft-v3` | **Paper model "Meric"** — Stage-1 Music Head, Qwen3-VL backbone, ARIA-finetuned (squaredcos + v-prediction + EMA + min-SNR). |
37
- | `rdm_sft_instrumental.pth` | `meric-instrumental` | Stage-1 Music Head trained on vocal-filtered data — cleaner **instrumental** output. |
38
- | `mericldm.ckpt` | *(shared Stage-2)* | The Stage-2 Flow Decoder (MuQ → audio). Both Music Heads run through it. |
39
 
40
- The Stage-2 acoustic components it builds on (Stable Audio Open VAE/DiT, CLAP) are downloaded automatically from their public upstream repos at first use.
 
 
 
 
41
 
42
- ## Usage
 
 
 
43
 
44
- Install the package, then generate — weights download automatically on first use:
 
 
45
 
46
  ```bash
47
- pip install git+https://github.com/TODO/meric.git
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  ```
49
 
50
  ```python
51
  from meric import MericPipeline
52
 
53
  pipe = MericPipeline.from_pretrained("meric-sft-v3", device="cuda:0")
54
- wavs = pipe.generate(image="photo.jpg", n=3, output_dir="out/") # list of WAV paths
55
- # also: pipe.generate(text="a calm piano melody with gentle rain")
56
- # cleaner instrumental output: MericPipeline.from_pretrained("meric-instrumental")
57
  ```
58
 
59
- Or from the command line:
60
 
61
- ```bash
62
- meric generate --image photo.jpg -o out/ # image -> music
63
- meric generate --text "lo-fi hip hop, 90 BPM" -o out/
64
- meric models # list available models
65
- ```
66
 
67
- See the [repository](https://github.com/TODO/meric) and `docs/USAGE.md` for the full guide.
 
 
68
 
69
- ## Intended use & limitations
 
70
 
71
- - **Intended use**: research and creative prototyping of music generation from visual/textual prompts, and cross-modal music retrieval.
72
- - The Qwen3-VL backbone (used by both published heads) requires the external Qwen3-VL embedding environment for image/video inputs; see the repository setup guide.
73
- - Generation is **one-to-many** and stochastic: different seeds yield different plausible scores for the same input. Use `meric-instrumental` when vocal-like artifacts are undesirable.
74
- - Outputs are AI-generated audio and may reflect biases of the training data; not intended for use as production music without review.
75
 
76
- ## Training data
77
 
78
- The Stage-1 heads are fine-tuned on **ARIA** (Art-Referenced Instrumental Audio): source images (Unsplash + WikiArt) paired with model-generated captions and AI-generated instrumental music. Stage 2 is trained on large unpaired music corpora. ARIA's source images, captions, and audio carry their own upstream terms.
 
 
 
 
 
 
 
79
 
80
- ## License & attribution
81
 
82
- - The MERIC **source code** is licensed under **Apache-2.0**.
83
- - **These model weights are NOT Apache-2.0.** The Stage-2 decoder derives from **Stable Audio Open**, so the released weights inherit the **[Stability AI Community License](https://huggingface.co/stabilityai/stable-audio-open-1.0/blob/main/LICENSE.md)** — a non-OSI license with use restrictions (including commercial-use conditions). Review it before any redistribution or commercial use.
84
- - Built on: **MuQ** (music anchor encoder), **Qwen3-VL** (vision-language embeddings), **OpenCLIP ViT-H-14**, **CLAP**, and **Stable Audio Open** (VAE/DiT). Each carries its own upstream license — see the repository `NOTICE`.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
 
86
  ## Citation
87
 
88
  ```bibtex
89
- @inproceedings{meric2026,
90
- title = {MERIC: Unified Multimodal Music Generation and Retrieval via a Music Semantic Anchor},
91
- author = {MERIC authors},
92
- booktitle = {European Conference on Computer Vision (ECCV)},
93
- year = {2026},
94
- note = {TODO: update with final author list, pages, and DOI on publication}
95
  }
96
  ```
 
 
 
 
1
  ---
2
  license: other
3
+ license_name: multiple-upstream-model-licenses
4
+ license_link: https://huggingface.co/Audiofool/meric#licenses
5
  base_model:
6
  - stabilityai/stable-audio-open-1.0
7
+ - OpenMuQ/MuQ-MuLan-large
8
  pipeline_tag: text-to-audio
9
  tags:
10
  - music-generation
 
11
  - image-to-music
 
12
  - video-to-music
13
+ - text-to-music
14
+ - multimodal
15
  - cross-modal-retrieval
16
+ - flow-matching
17
+ - diffusion
18
  library_name: meric
19
  ---
20
 
21
+ # Meric
22
 
23
+ Meric is the model release for **Meric: A Unified Framework for Multimodal Music Generation and Retrieval via Representation Space Anchoring**, accepted to ECCV 2026.
24
 
25
+ Meric generates 44.1 kHz music from images, videos, and text.
26
+ It first maps Qwen3-VL-Embedding features through a stochastic Music Head into a 512-dimensional MuQ music semantic anchor, then renders audio with a MuQ-conditioned flow decoder.
27
+ The same anchor supports cross-modal retrieval.
28
 
29
+ - [Code](https://github.com/Audiofool934/meric)
30
+ - [Paper](https://media.eventhosts.cc/Conferences/ECCV2026/pdfs/2169.pdf)
31
+ - [Project page](https://audiofool.blog/meric/)
32
+ - [Setup and reproducibility documentation](https://github.com/Audiofool934/meric/tree/main/docs)
33
 
34
+ The arXiv URL, proceedings pages, and DOI will be added when available.
35
 
36
+ The code repository is currently private while release preparation is completed.
37
+ The model weights are available now; the installation commands below require repository access until the code release.
38
 
39
+ ## Files
 
 
 
 
40
 
41
+ | File | Registered name | Bytes | SHA-256 | Purpose |
42
+ |---|---|---:|---|---|
43
+ | `rdm_sft_v3.pth` | `meric-sft-v3` | 2,025,788,845 | `1f53e8d7bdae7309f48a4cecea2f0a3b92166ba8f09de37ad70a57ccbe595320` | Camera-ready Music Head and default model |
44
+ | `rdm_sft_instrumental.pth` | `meric-instrumental` | 2,025,788,845 | `09b290a6f31dccc3d0b521eb61b372bb368288d22203b592f0d6c62ca2d3b2c3` | Instrumental-focused Music Head |
45
+ | `mericldm.ckpt` | shared Stage 2 | 15,903,442,922 | `f43d8abc8d7a7aabe60ef68f29bce544641d236681f44f9ecadd33607fa4d47a` | MuQ-conditioned flow decoder |
46
 
47
+ These checkpoint contents were verified at revision `d96e2adcfa1daf9508beee26e9467e9b98e58681`.
48
+ The code repository records its current immutable Hub revision in `meric/hub.py` and `docs/MODELS.md`.
49
+
50
+ ## Installation
51
 
52
+ Meric is tested on Linux with Python 3.10, PyTorch 2.5.1, and CUDA 12.1.
53
+ Qwen3-VL-Embedding runs in a separate Python 3.11 environment prepared by the repository helper.
54
+ All default project and upstream revisions are immutable.
55
 
56
  ```bash
57
+ git clone https://github.com/Audiofool934/meric.git
58
+ cd meric
59
+
60
+ python3.10 -m venv .venv
61
+ source .venv/bin/activate
62
+ pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 \
63
+ --index-url https://download.pytorch.org/whl/cu121
64
+ pip install -e .
65
+
66
+ python -m pip install uv==0.9.26
67
+ bash scripts/setup_qwen3vl.sh
68
+ export QWEN3VL_REPO="$PWD/.external/Qwen3-VL-Embedding"
69
+ ```
70
+
71
+ ## Usage
72
+
73
+ ```bash
74
+ meric generate \
75
+ --image examples/images/sample_sunset.jpg \
76
+ --seed 42 \
77
+ --output-dir outputs/sunset
78
+
79
+ meric generate \
80
+ --text "A calm piano melody with gentle rain" \
81
+ --seed 42 \
82
+ --output-dir outputs/text
83
+
84
+ meric generate \
85
+ --video path/to/clip.mp4 \
86
+ --video-max-frames 8 \
87
+ --seed 42 \
88
+ --output-dir outputs/video
89
  ```
90
 
91
  ```python
92
  from meric import MericPipeline
93
 
94
  pipe = MericPipeline.from_pretrained("meric-sft-v3", device="cuda:0")
95
+ wavs = pipe.generate(image="photo.jpg", seeds=[7, 11, 23], output_dir="outputs/image")
 
 
96
  ```
97
 
98
+ Each run writes a `manifest.json` containing generation settings, exact seeds, model revisions, and input and output checksums.
99
 
100
+ ## Training data
 
 
 
 
101
 
102
+ The Music Head is pretrained on 369K cross-modal pairs from AudioSet-Music, MelBench, and EmoMV, then fine-tuned on the 4K-image ARIA training split with 15 percent AudioSet replay.
103
+ The flow decoder is trained with MuQ conditions from 100K FMA songs, 130K MusicSet clips, and 400K AudioSet-Music clips.
104
+ See the paper and repository data documentation for the current artifact boundary, split definitions, and provenance requirements.
105
 
106
+ ARIA is not bundled with this model repository.
107
+ Its public release requires a separate dataset card and confirmation of redistribution terms.
108
 
109
+ ## Camera-ready results
 
 
 
110
 
111
+ Lower FAD is better and higher Sem is better.
112
 
113
+ | Task | Dataset | FAD-MERT | FAD-CLAP | Sem |
114
+ |---|---|---:|---:|---:|
115
+ | Vision to music | MelBench | 1.55 | 0.127 | 74.7 |
116
+ | Vision to music | MuImage | 1.79 | 0.169 | 87.1 |
117
+ | Vision to music | EmoMV | 3.06 | 0.253 | 81.0 |
118
+ | Vision to music | ARIA | 3.30 | 0.247 | 79.6 |
119
+ | Text to music | MusicCaps | 1.87 | 0.110 | 74.2 |
120
+ | Text to music | ARIA | 2.14 | 0.155 | 74.5 |
121
 
122
+ Complete generation, retrieval, and ablation tables are transcribed in the code repository.
123
 
124
+ ## Intended use
125
+
126
+ This release is intended for academic research, reproducibility studies, and creative prototyping of multimodal music generation and retrieval.
127
+ Generated audio should be reviewed before publication or downstream use.
128
+ Users are responsible for rights and consent associated with their inputs and outputs.
129
+
130
+ ## Limitations
131
+
132
+ - Generation is stochastic and can vary substantially by seed.
133
+ - Semantic fit, musical quality, and cultural coverage vary by prompt and domain.
134
+ - The training corpora and frozen upstream encoders may introduce biases.
135
+ - The model is not designed for realistic singing voice generation.
136
+ - Evaluation relies partly on learned metrics and an LLM-based semantic judge, each with known limitations.
137
+ - End-to-end inference requires substantial GPU memory and roughly 30 GB of downloaded model artifacts.
138
+
139
+ ## Licenses
140
+
141
+ The Meric source repository is Apache-2.0.
142
+ These model files are not Apache-2.0 licensed.
143
+ Stage 2 derives from Stable Audio Open 1.0 and is governed by the [Stability AI Community License](https://huggingface.co/stabilityai/stable-audio-open-1.0/blob/main/LICENSE.md).
144
+ The current `mericldm.ckpt` also serializes frozen MuQ-MuLan parameters under the historical `clap.*` namespace; those parameters retain the upstream [CC BY-NC 4.0](https://github.com/tencent-ailab/MuQ/blob/main/LICENSE_weights) terms.
145
+ Qwen3-VL-Embedding and other dependencies retain their own terms.
146
+ Review the repository `NOTICE` before redistribution, deployment, or commercial use.
147
 
148
  ## Citation
149
 
150
  ```bibtex
151
+ @inproceedings{wang2026meric,
152
+ title = {Meric: A Unified Framework for Multimodal Music Generation and Retrieval via Representation Space Anchoring},
153
+ author = {Wang, Xihua and Wang, Yinbo and Zhang, Jingchao and Song, Ruihua},
154
+ booktitle = {European Conference on Computer Vision},
155
+ year = {2026}
 
156
  }
157
  ```
158
+
159
+ Xihua Wang, Yinbo Wang, and Jingchao Zhang contributed equally.
160
+ Ruihua Song is the corresponding author.