Add named DMS model bundle
Browse filesUploaded from the audited local DMS model bundle; generic payload filenames remain inside the model repository.
- DMS-MODEL-NOTES.md +20 -0
- LICENSE.md +55 -0
- README.md +19 -0
- en_us_cmudict_ipa_forward.pt +3 -0
- jam-0_5.safetensors +3 -0
- jam_infer.yaml +66 -0
- payload/README.md +316 -0
- silience_latent.pt +3 -0
- vocal.npy +3 -0
DMS-MODEL-NOTES.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# DMS model notes: JAM 0.5
|
| 2 |
+
|
| 3 |
+
Repository: `DanielMarius/dms-jam-0-5`
|
| 4 |
+
Grouping rule: JAM music model assets grouped by model directory.
|
| 5 |
+
License evidence: C:\drakula\Media-Artifacts\models\music\JAM-0.5\LICENSE.md
|
| 6 |
+
|
| 7 |
+
## Local sources
|
| 8 |
+
|
| 9 |
+
- `C:\drakula\Media-Artifacts\models\music\JAM-0.5`
|
| 10 |
+
|
| 11 |
+
## Files
|
| 12 |
+
|
| 13 |
+
- `.gitattributes`: `1519 bytes`; source `C:\drakula\Media-Artifacts\models\music\JAM-0.5\.gitattributes`
|
| 14 |
+
- `LICENSE.md`: `2878 bytes`; source `C:\drakula\Media-Artifacts\models\music\JAM-0.5\LICENSE.md`
|
| 15 |
+
- `en_us_cmudict_ipa_forward.pt`: `65637046 bytes`; source `C:\drakula\Media-Artifacts\models\music\JAM-0.5\en_us_cmudict_ipa_forward.pt`
|
| 16 |
+
- `jam-0_5.safetensors`: `2131767520 bytes`; source `C:\drakula\Media-Artifacts\models\music\JAM-0.5\jam-0_5.safetensors`
|
| 17 |
+
- `jam_infer.yaml`: `1460 bytes`; source `C:\drakula\Media-Artifacts\models\music\JAM-0.5\jam_infer.yaml`
|
| 18 |
+
- `payload/README.md`: `12975 bytes`; source `C:\drakula\Media-Artifacts\models\music\JAM-0.5\README.md`
|
| 19 |
+
- `silience_latent.pt`: `111713 bytes`; source `C:\drakula\Media-Artifacts\models\music\JAM-0.5\silience_latent.pt`
|
| 20 |
+
- `vocal.npy`: `2176 bytes`; source `C:\drakula\Media-Artifacts\models\music\JAM-0.5\vocal.npy`
|
LICENSE.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# LICENSE
|
| 2 |
+
|
| 3 |
+
## 1. Model & License Summary
|
| 4 |
+
|
| 5 |
+
This repository contains **JAM** (the "Model"), the first open-sourced model released under **Project Jamify**, developed for facilitating academic research and creative exploration in AI-generated songs from lyrics. The Model is subject to:
|
| 6 |
+
|
| 7 |
+
1. The **Project Jamify License**: Intended **solely for non-commercial, academic, and entertainment purposes**
|
| 8 |
+
2. The **Stability AI Community License Agreement**, provided in the file ```STABILITY_AI_COMMUNITY_LICENSE.md```.
|
| 9 |
+
|
| 10 |
+
By using or distributing this Model, you **agree** to adhere to all applicable licenses and restrictions, as summarized below.
|
| 11 |
+
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
## 2. Project Jamify License Terms
|
| 15 |
+
|
| 16 |
+
**JAM** is developed with the primary objective of facilitating academic research and creative exploration in AI-generated songs from lyrics. We emphasize the following:
|
| 17 |
+
|
| 18 |
+
- **No copyrighted material** was used in a way that would intentionally infringe on intellectual property rights. JAM is not designed to reproduce or imitate any specific artist, label, or protected work.
|
| 19 |
+
- Outputs generated by JAM must **not be used to create or disseminate content that violates copyright laws**.
|
| 20 |
+
- The **commercial use of JAM or its outputs is strictly prohibited**.
|
| 21 |
+
- Responsibility for the use of the model and its outputs lies entirely with the end user, who must ensure all uses comply with applicable legal and ethical standards.
|
| 22 |
+
|
| 23 |
+
---
|
| 24 |
+
|
| 25 |
+
## 3. Stability AI Community License Requirements
|
| 26 |
+
|
| 27 |
+
- You must comply with the **Stability AI Community License Agreement** (the "Agreement") for any usage, distribution, or modification of this Model.
|
| 28 |
+
- **Non-Commercial Use**: This Model is for research and academic purposes only. Any commercial usage requires registering with Stability AI or obtaining a separate commercial license.
|
| 29 |
+
- **Attribution & Notice**:
|
| 30 |
+
- Retain the notice:
|
| 31 |
+
```
|
| 32 |
+
This Stability AI Model is licensed under the Stability AI Community License, Copyright Β© Stability AI Ltd. All Rights Reserved.
|
| 33 |
+
```
|
| 34 |
+
- Clearly display "Powered by Stability AI" if you build upon or showcase this Model.
|
| 35 |
+
- **Disclaimer & Liability**: This Model is provided **"AS IS"** with **no warranties**. Neither we nor Stability AI will be liable for any claim or damages related to Model use.
|
| 36 |
+
|
| 37 |
+
See ```STABILITY_AI_COMMUNITY_LICENSE.md``` for the full text.
|
| 38 |
+
|
| 39 |
+
---
|
| 40 |
+
|
| 41 |
+
## 4. UK Data Copyright Exemption
|
| 42 |
+
|
| 43 |
+
This Model was developed under the **UK data copyright exemption for non-commercial research**. Distribution or use outside these bounds must **not** violate that exemption or infringe on any underlying dataset's license.
|
| 44 |
+
|
| 45 |
+
---
|
| 46 |
+
|
| 47 |
+
## 5. Further Information
|
| 48 |
+
|
| 49 |
+
- **Stability AI License Terms**: <https://stability.ai/community-license>
|
| 50 |
+
|
| 51 |
+
For questions, concerns, or collaboration inquiries, please contact the Project Jamify team via the official repository or project website.
|
| 52 |
+
|
| 53 |
+
---
|
| 54 |
+
|
| 55 |
+
**End of License**.
|
README.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# JAM 0.5
|
| 2 |
+
|
| 3 |
+
This Hugging Face model repository is a named bundle from the Drakula Media Studio project.
|
| 4 |
+
|
| 5 |
+
- Model name: `JAM 0.5`
|
| 6 |
+
- Artifact family: `audio/voice component`
|
| 7 |
+
- License: `see C:\drakula\Media-Artifacts\models\music\JAM-0.5\LICENSE.md`
|
| 8 |
+
- Payload files: `8`
|
| 9 |
+
- Payload size: `2197537287 bytes`
|
| 10 |
+
|
| 11 |
+
The repository name follows the model or model family. Generic files such as `pytorch_model.bin`, `model.pt`, `model.safetensors`, or `.bin` are payload filenames inside this repository, not separate repositories.
|
| 12 |
+
|
| 13 |
+
## Provenance
|
| 14 |
+
|
| 15 |
+
The files were collected from the local DMS/Drakula model stores. Source paths and candidate content identities are recorded in `DMS-MODEL-NOTES.md`.
|
| 16 |
+
|
| 17 |
+
## Usage
|
| 18 |
+
|
| 19 |
+
Use the files according to the upstream model family and the directory names preserved in this repository. Check the upstream project documentation before redistribution or production use.
|
en_us_cmudict_ipa_forward.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cadce3d77597b55e772799cb46994ab29a460f1a62a87207b52f3cdb29894e02
|
| 3 |
+
size 65637046
|
jam-0_5.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:19c341492231d6ac82b6446f88265aae0fc9bfd8fd0c5f6ef94d1667901a1e98
|
| 3 |
+
size 2131767520
|
jam_infer.yaml
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
project_root: "."
|
| 2 |
+
evaluation:
|
| 3 |
+
checkpoint_path: ""
|
| 4 |
+
output_dir: "outputs"
|
| 5 |
+
test_set_path: "inputs/input.json"
|
| 6 |
+
negative_style_prompt: ${project_root}/public/vocal.npy
|
| 7 |
+
num_samples: null
|
| 8 |
+
batch_size: 1
|
| 9 |
+
random_crop_style: false
|
| 10 |
+
vae_type: 'diffrhythm'
|
| 11 |
+
num_style_secs: 30
|
| 12 |
+
ignore_style: false
|
| 13 |
+
use_prompt_style: false
|
| 14 |
+
|
| 15 |
+
dataset:
|
| 16 |
+
pattern: "placeholder"
|
| 17 |
+
shuffle: false
|
| 18 |
+
resample_by_duration_threshold: null
|
| 19 |
+
always_crop_from_beginning: true
|
| 20 |
+
always_use_style_index: 0
|
| 21 |
+
|
| 22 |
+
sample_kwargs:
|
| 23 |
+
cfg_range:
|
| 24 |
+
- 0.05
|
| 25 |
+
- 1
|
| 26 |
+
dual_cfg:
|
| 27 |
+
- 4.7
|
| 28 |
+
- 2.5
|
| 29 |
+
steps: 50
|
| 30 |
+
|
| 31 |
+
model:
|
| 32 |
+
num_channels: 64
|
| 33 |
+
cfm:
|
| 34 |
+
max_frames: ${max_frames}
|
| 35 |
+
num_channels: ${model.num_channels}
|
| 36 |
+
dual_drop_prob: [0.1, 0.5]
|
| 37 |
+
no_edit: true
|
| 38 |
+
|
| 39 |
+
dit:
|
| 40 |
+
max_frames: ${max_frames}
|
| 41 |
+
mel_dim: ${model.num_channels}
|
| 42 |
+
dim: 1408
|
| 43 |
+
depth: 16
|
| 44 |
+
heads: 32
|
| 45 |
+
ff_mult: 4
|
| 46 |
+
text_dim: 512
|
| 47 |
+
conv_layers: 4
|
| 48 |
+
grad_ckpt: true
|
| 49 |
+
use_implicit_duration: true
|
| 50 |
+
|
| 51 |
+
data:
|
| 52 |
+
train_dataset:
|
| 53 |
+
max_frames: ${max_frames}
|
| 54 |
+
multiple_styles: true
|
| 55 |
+
sampling_rate: 44100
|
| 56 |
+
shuffle: true
|
| 57 |
+
silence_latent_path: ${project_root}/public/silience_latent.pt
|
| 58 |
+
tokenizer_path: ${project_root}/public/en_us_cmudict_ipa_forward.pt
|
| 59 |
+
lrc_upsample_factor: ${lrc_upsample_factor}
|
| 60 |
+
filler: average_sparse
|
| 61 |
+
phonemizer_checkpoint: ${project_root}/public/en_us_cmudict_ipa_forward.pt
|
| 62 |
+
|
| 63 |
+
# General settings
|
| 64 |
+
max_frames: 5000
|
| 65 |
+
lrc_upsample_factor: 4
|
| 66 |
+
seed: 42
|
payload/README.md
ADDED
|
@@ -0,0 +1,316 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
library_name: diffusers
|
| 5 |
+
metrics:
|
| 6 |
+
- PER
|
| 7 |
+
- WER
|
| 8 |
+
- SongEval
|
| 9 |
+
- Audio Aesthetics
|
| 10 |
+
- MuQ
|
| 11 |
+
- FAD
|
| 12 |
+
pipeline_tag: text-to-audio
|
| 13 |
+
tags:
|
| 14 |
+
- music
|
| 15 |
+
- art
|
| 16 |
+
- song-generation
|
| 17 |
+
- lyrics-to-song
|
| 18 |
+
- flow-matching
|
| 19 |
+
- direct-preference-optimization
|
| 20 |
+
license: other
|
| 21 |
+
---
|
| 22 |
+
|
| 23 |
+
<div align="center">
|
| 24 |
+
<img src="https://declare-lab.github.io/jamify-logo-new.png" width="200"/ >
|
| 25 |
+
<br/>
|
| 26 |
+
<h1>JAM: A Tiny Flow-based Song Generator with Fine-grained Controllability and Aesthetic Alignment</h1>
|
| 27 |
+
<br/>
|
| 28 |
+
|
| 29 |
+
[](https://arxiv.org/abs/2507.20880) [](https://huggingface.co/declare-lab/JAM-0.5) [](https://huggingface.co/datasets/declare-lab/JAME) [](https://huggingface.co/spaces/declare-lab/JAM) [](https://github.com/declare-lab/jamify) [](https://declare-lab.github.io/jamify)
|
| 30 |
+
|
| 31 |
+
</div>
|
| 32 |
+
|
| 33 |
+
JAM is a rectified flow-based model for lyrics-to-song generation that addresses the lack of fine-grained word-level controllability in existing lyrics-to-song models. Built on a compact 530M-parameter architecture with 16 LLaMA-style Transformer layers as the Diffusion Transformer (DiT) backbone, JAM enables precise vocal control that musicians desire in their workflows. Unlike previous models, JAM provides word and phoneme-level timing control, allowing musicians to specify the exact placement of each vocal sound for improved rhythmic flexibility and expressive timing.
|
| 34 |
+
|
| 35 |
+
## News
|
| 36 |
+
> π£ 29/07/25: We have released JAM-0.5, the first version of the AI song generator from Project Jamify!
|
| 37 |
+
|
| 38 |
+
## Paper Abstract
|
| 39 |
+
|
| 40 |
+
Diffusion and flow-matching models have revolutionized automatic text-to-audio generation in recent times. These models are increasingly capable of generating high quality and faithful audio outputs capturing to speech and acoustic events. However, there is still much room for improvement in creative audio generation that primarily involves music and songs. Recent open lyrics-to-song models, such as, DiffRhythm, ACE-Step, and LeVo, have set an acceptable standard in automatic song generation for recreational use. However, these models lack fine-grained word-level controllability often desired by musicians in their workflows. To the best of our knowledge, our flow-matching-based JAM is the first effort toward endowing word-level timing and duration control in song generation, allowing fine-grained vocal control. To enhance the quality of generated songs to better align with human preferences, we implement aesthetic alignment through Direct Preference Optimization, which iteratively refines the model using a synthetic dataset, eliminating the need or manual data annotations. Furthermore, we aim to standardize the evaluation of such lyrics-to-song models through our public evaluation dataset JAME. We show that JAM outperforms the existing models in terms of the music-specific attributes.
|
| 41 |
+
|
| 42 |
+
## Features
|
| 43 |
+
|
| 44 |
+

|
| 45 |
+
|
| 46 |
+
- **Fine-grained Word and Phoneme-level Timing Control**: The first model to provide word-level timing and duration control in song generation, enabling precise prosody control for musicians
|
| 47 |
+
- **Compact 530M Parameter Architecture**: Less than half the size of existing models, enabling faster inference with reduced resource requirements
|
| 48 |
+
- **Enhanced Lyric Fidelity**: Achieves over 3Γ reduction in Word Error Rate (WER) and Phoneme Error Rate (PER) compared to prior work through precise phoneme boundary attention
|
| 49 |
+
- **Global Duration Control**: Controllable duration up to 3 minutes and 50 seconds.
|
| 50 |
+
- **Aesthetic Alignment through Direct Preference Optimization**: Iterative refinement using synthetic preference datasets to better align with human aesthetic preferences, eliminating manual annotation requirements
|
| 51 |
+
|
| 52 |
+
## The Pipeline
|
| 53 |
+
|
| 54 |
+

|
| 55 |
+
|
| 56 |
+
## JAM Samples
|
| 57 |
+
|
| 58 |
+
Check out the example generated music in the `generated_examples/` folder to hear what JAM can produce:
|
| 59 |
+
|
| 60 |
+
- **`Hybrid Minds, Brodie - Heroin.mp3`** - Electronic music with synthesized beats and electronic elements
|
| 61 |
+
- **`Jade Bird - Avalanche.mp3`** - Country music with acoustic guitar and folk influences
|
| 62 |
+
- **`Rizzle Kicks, Rachel Chinouriri - Follow Excitement!.mp3`** - Rap music with rhythmic beats and hip-hop style
|
| 63 |
+
|
| 64 |
+
These samples demonstrate JAM's ability to generate high-quality music across different genres while maintaining vocal intelligence, style consistency and musical coherence.
|
| 65 |
+
|
| 66 |
+
## Requirements
|
| 67 |
+
|
| 68 |
+
- Python 3.10 or higher
|
| 69 |
+
- CUDA-compatible GPU with sufficient VRAM (8GB+ recommended)
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
## Installation
|
| 73 |
+
|
| 74 |
+
### 1. Clone the Repository
|
| 75 |
+
|
| 76 |
+
```bash
|
| 77 |
+
git clone https://github.com/declare-lab/jamify
|
| 78 |
+
cd jam
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
### 2. Run Installation Script
|
| 82 |
+
|
| 83 |
+
The project includes an automated installation script, run it in your own virtual environment:
|
| 84 |
+
|
| 85 |
+
```bash
|
| 86 |
+
bash install.sh
|
| 87 |
+
```
|
| 88 |
+
|
| 89 |
+
This script will:
|
| 90 |
+
- Initialize and update git submodules (DeepPhonemizer)
|
| 91 |
+
- Install Python dependencies from `requirements.txt`
|
| 92 |
+
- Install the JAM package in editable mode
|
| 93 |
+
- Install the DeepPhonemizer external dependency
|
| 94 |
+
|
| 95 |
+
### 3. Manual Installation (Alternative)
|
| 96 |
+
|
| 97 |
+
If you prefer manual installation:
|
| 98 |
+
|
| 99 |
+
```bash
|
| 100 |
+
# Initialize submodules
|
| 101 |
+
git submodule update --init --recursive
|
| 102 |
+
|
| 103 |
+
# Install dependencies
|
| 104 |
+
pip install -r requirements.txt
|
| 105 |
+
|
| 106 |
+
# Install JAM package
|
| 107 |
+
pip install -e .
|
| 108 |
+
|
| 109 |
+
# Install DeepPhonemizer
|
| 110 |
+
pip install -e externals/DeepPhonemizer
|
| 111 |
+
```
|
| 112 |
+
|
| 113 |
+
## Quick Start
|
| 114 |
+
|
| 115 |
+
### Simple Inference
|
| 116 |
+
|
| 117 |
+
The easiest way to run inference is using the provided `inference.py` script:
|
| 118 |
+
|
| 119 |
+
```python
|
| 120 |
+
python inference.py
|
| 121 |
+
```
|
| 122 |
+
|
| 123 |
+
This script will:
|
| 124 |
+
1. Download the pre-trained JAM-0.5 model from Hugging Face
|
| 125 |
+
2. Run inference with default settings
|
| 126 |
+
3. Save generated audio to the `outputs` directory
|
| 127 |
+
|
| 128 |
+
### Input Format
|
| 129 |
+
|
| 130 |
+
Create an input file at `inputs/input.json` with your songs:
|
| 131 |
+
|
| 132 |
+
```json
|
| 133 |
+
[
|
| 134 |
+
{
|
| 135 |
+
"id": "my_song",
|
| 136 |
+
"audio_path": "inputs/reference_audio.mp3",
|
| 137 |
+
"lrc_path": "inputs/lyrics.json",
|
| 138 |
+
"duration": 180.0,
|
| 139 |
+
"prompt_path": "inputs/style_prompt.txt"
|
| 140 |
+
}
|
| 141 |
+
]
|
| 142 |
+
```
|
| 143 |
+
|
| 144 |
+
Required files:
|
| 145 |
+
- **Audio file**: Reference audio for style extraction
|
| 146 |
+
- **Lyrics file**: JSON with timestamped lyrics
|
| 147 |
+
- **Prompt file**: Text description of desired style/genre. Text prompt is not used in the default setting where the audio reference is utilized.
|
| 148 |
+
|
| 149 |
+
## Advanced Usage
|
| 150 |
+
|
| 151 |
+
### Using `python -m jam.infer`
|
| 152 |
+
|
| 153 |
+
For more control over the generation process:
|
| 154 |
+
|
| 155 |
+
```bash
|
| 156 |
+
# Basic usage with custom checkpoint
|
| 157 |
+
python -m jam.infer evaluation.checkpoint_path=path/to/model.safetensors
|
| 158 |
+
|
| 159 |
+
# With custom output directory
|
| 160 |
+
python -m jam.infer evaluation.checkpoint_path=path/to/model.safetensors evaluation.output_dir=my_outputs
|
| 161 |
+
|
| 162 |
+
# With custom configuration file
|
| 163 |
+
python -m jam.infer config=configs/my_config.yaml evaluation.checkpoint_path=path/to/model.safetensors
|
| 164 |
+
```
|
| 165 |
+
|
| 166 |
+
### Multi-GPU Inference
|
| 167 |
+
|
| 168 |
+
Use Accelerate for distributed inference:
|
| 169 |
+
|
| 170 |
+
```bash
|
| 171 |
+
# Basic usage with custom checkpoint
|
| 172 |
+
accelerate launch --config_path path/to/accelerate/config.yaml jam.infer
|
| 173 |
+
|
| 174 |
+
# With custom configuration file
|
| 175 |
+
accelerate launch --config_path path/to/accelerate/config.yaml jam.infer config=path/to/inference/config.yaml
|
| 176 |
+
```
|
| 177 |
+
|
| 178 |
+
## Configuration Options
|
| 179 |
+
|
| 180 |
+
### Key Parameters
|
| 181 |
+
|
| 182 |
+
#### Evaluation Settings
|
| 183 |
+
- `evaluation.checkpoint_path`: Path to model checkpoint (required)
|
| 184 |
+
- `evaluation.output_dir`: Output directory (default: "outputs")
|
| 185 |
+
- `evaluation.test_set_path`: Input JSON file (default: "inputs/input.json")
|
| 186 |
+
- `evaluation.batch_size`: Batch size for inference (default: 1)
|
| 187 |
+
- `evaluation.num_samples`: Only generate first n samples in test_set_path (null = all)
|
| 188 |
+
- `evaluation.vae_type`: VAE model type ("diffrhythm" or "stable_audio")
|
| 189 |
+
|
| 190 |
+
#### Style Control
|
| 191 |
+
- `evaluation.ignore_style`: Ignore style prompts (default: false)
|
| 192 |
+
- `evaluation.use_prompt_style`: Use text prompts for style (default: false)
|
| 193 |
+
- `evaluation.num_style_secs`: Style audio duration in seconds (default: 30)
|
| 194 |
+
- `evaluation.random_crop_style`: Randomly crop style audio (default: false)
|
| 195 |
+
|
| 196 |
+
## Input File Formats
|
| 197 |
+
|
| 198 |
+
### Lyrics File (`*.json`)
|
| 199 |
+
```json
|
| 200 |
+
[
|
| 201 |
+
{"start": 2.2, "end": 2.5, "word": "First word of lyrics"},
|
| 202 |
+
{"start": 2.5, "end": 3.7, "word": "Second word of lyrics"},
|
| 203 |
+
{"more lines ...."}
|
| 204 |
+
]
|
| 205 |
+
```
|
| 206 |
+
|
| 207 |
+
### Style Prompt File (`*.txt`)
|
| 208 |
+
```
|
| 209 |
+
Electronic dance music with heavy bass and synthesizers
|
| 210 |
+
```
|
| 211 |
+
|
| 212 |
+
### Input Manifest (`input.json`)
|
| 213 |
+
```json
|
| 214 |
+
[
|
| 215 |
+
{
|
| 216 |
+
"id": "unique_song_id",
|
| 217 |
+
"audio_path": "path/to/reference.mp3",
|
| 218 |
+
"lrc_path": "path/to/lyrics.json",
|
| 219 |
+
"duration": 180.0,
|
| 220 |
+
"prompt_path": "path/to/style.txt"
|
| 221 |
+
}
|
| 222 |
+
]
|
| 223 |
+
```
|
| 224 |
+
|
| 225 |
+
## Output Structure
|
| 226 |
+
|
| 227 |
+
Generated files are saved to the output directory:
|
| 228 |
+
|
| 229 |
+
```
|
| 230 |
+
outputs/
|
| 231 |
+
βββ generated/ # Final trimmed audio files
|
| 232 |
+
βββ generated_orig/ # Original generated audio
|
| 233 |
+
βββ cfm_latents/ # Intermediate latent representations
|
| 234 |
+
βββ local_files/ # Process-specific metadata
|
| 235 |
+
βββ generation_config.yaml # Configuration used for generation
|
| 236 |
+
```
|
| 237 |
+
|
| 238 |
+
## Performance Tips
|
| 239 |
+
|
| 240 |
+
1. **GPU Memory**: Use `evaluation.batch_size=1` for large on limited VRAM
|
| 241 |
+
2. **Multi-GPU**: Use `accelerate launch` for faster processing of multiple samples
|
| 242 |
+
3. **Mixed Precision**: Add `--mixed_precision=fp16` to reduce memory usage
|
| 243 |
+
|
| 244 |
+
## Troubleshooting
|
| 245 |
+
|
| 246 |
+
### Common Issues
|
| 247 |
+
|
| 248 |
+
#### "Checkpoint path not found"
|
| 249 |
+
```bash
|
| 250 |
+
# Make sure to specify the checkpoint path
|
| 251 |
+
python -m jam.infer evaluation.checkpoint_path=path/to/your/model.safetensors
|
| 252 |
+
```
|
| 253 |
+
|
| 254 |
+
#### "CUDA out of memory"
|
| 255 |
+
```bash
|
| 256 |
+
# Reduce batch size or use mixed precision
|
| 257 |
+
accelerate launch --mixed_precision=fp16 -m jam.infer evaluation.checkpoint_path=model.safetensors
|
| 258 |
+
```
|
| 259 |
+
|
| 260 |
+
#### "Test set not found"
|
| 261 |
+
```bash
|
| 262 |
+
# Create input.json file in inputs/ directory or specify custom path
|
| 263 |
+
python -m jam.infer evaluation.test_set_path=path/to/your/input.json evaluation.checkpoint_path=model.safetensors
|
| 264 |
+
```
|
| 265 |
+
|
| 266 |
+
## Model Downloads
|
| 267 |
+
|
| 268 |
+
The `inference.py` script automatically downloads the JAM-0.5 model. For manual download:
|
| 269 |
+
|
| 270 |
+
```python
|
| 271 |
+
from huggingface_hub import snapshot_download
|
| 272 |
+
model_path = snapshot_download(repo_id="declare-lab/jam-0.5")
|
| 273 |
+
```
|
| 274 |
+
|
| 275 |
+
## Citation
|
| 276 |
+
|
| 277 |
+
If you use JAM in your research, please cite:
|
| 278 |
+
|
| 279 |
+
```bibtex
|
| 280 |
+
@misc{jam2024,
|
| 281 |
+
title={JAM: A Tiny Flow-based Song Generator with Fine-grained Controllability and Aesthetic Alignment},
|
| 282 |
+
author={Renhang Liu and Chia-Yu Hung and Navonil Majumder and Taylor Gautreaux and Amir Ali Bagherzadeh and Chuan Li and Dorien Herremans and Soujanya Poria},
|
| 283 |
+
year={2025},
|
| 284 |
+
eprint={2507.20880},
|
| 285 |
+
archivePrefix={arXiv},
|
| 286 |
+
url={https://huggingface.co/papers/2507.20880},
|
| 287 |
+
}
|
| 288 |
+
```
|
| 289 |
+
|
| 290 |
+
## License
|
| 291 |
+
|
| 292 |
+
**JAM** is the first open-sourced model released under **Project Jamify**, developed for facilitating academic research and creative exploration in AI-generated songs from lyrics. The model is subject to:
|
| 293 |
+
|
| 294 |
+
1. **Project Jamify License**: Intended **solely for non-commercial, academic, and entertainment purposes**
|
| 295 |
+
2. **Stability AI Community License Agreement**: Required due to use of Stability AI model components
|
| 296 |
+
|
| 297 |
+
### Key Restrictions:
|
| 298 |
+
- **No copyrighted material** was used in a way that would intentionally infringe on intellectual property rights
|
| 299 |
+
- **JAM is not designed** to reproduce or imitate any specific artist, label, or protected work
|
| 300 |
+
- Outputs generated by JAM must **not be used to create or disseminate content that violates copyright laws**
|
| 301 |
+
- **Commercial use of JAM or its outputs is strictly prohibited**
|
| 302 |
+
- **Attribution Required**: Must retain "This Stability AI Model is licensed under the Stability AI Community License, Copyright Β© Stability AI Ltd. All Rights Reserved."
|
| 303 |
+
|
| 304 |
+
### Responsibility
|
| 305 |
+
Responsibility for the use of the model and its outputs lies entirely with the end user, who must ensure all uses comply with applicable legal and ethical standards.
|
| 306 |
+
|
| 307 |
+
For complete license terms, see [LICENSE.md](https://github.com/declare-lab/jamify/blob/main/LICENSE.md) and [STABILITY_AI_COMMUNITY_LICENSE.md](https://github.com/declare-lab/jamify/blob/main/STABILITY_AI_COMMUNITY_LICENSE.md).
|
| 308 |
+
|
| 309 |
+
For questions, concerns, or collaboration inquiries, please contact the Project Jamify team via the official repository.
|
| 310 |
+
|
| 311 |
+
## Support
|
| 312 |
+
|
| 313 |
+
For issues and questions:
|
| 314 |
+
- Open an issue on GitHub
|
| 315 |
+
- Check the troubleshooting section above
|
| 316 |
+
- Review the configuration options for parameter tuning
|
silience_latent.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a0e3fd3cfc226482b8d944b7dba2e2bb8af7848308bea8fd4f6e6b03e88ca87a
|
| 3 |
+
size 111713
|
vocal.npy
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6cb7d74eb7a8eda12acb8247b21d373928301db8a8cb0db480d341799fed3ce5
|
| 3 |
+
size 2176
|