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.
π£ 29/07/25: We have released JAM-0.5, the first version of the AI song generator from Project Jamify!
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.


Check out the example generated music in the generated_examples/ folder to hear what JAM can produce:
Hybrid Minds, Brodie - Heroin.mp3 - Electronic music with synthesized beats and electronic elementsJade Bird - Avalanche.mp3 - Country music with acoustic guitar and folk influencesRizzle Kicks, Rachel Chinouriri - Follow Excitement!.mp3 - Rap music with rhythmic beats and hip-hop styleThese samples demonstrate JAM's ability to generate high-quality music across different genres while maintaining vocal intelligence, style consistency and musical coherence.
git clone https://github.com/declare-lab/jamify
cd jam
The project includes an automated installation script, run it in your own virtual environment:
bash install.sh
This script will:
requirements.txtIf you prefer manual installation:
# Initialize submodules
git submodule update --init --recursive
# Install dependencies
pip install -r requirements.txt
# Install JAM package
pip install -e .
# Install DeepPhonemizer
pip install -e externals/DeepPhonemizer
The easiest way to run inference is using the provided inference.py script:
python inference.py
This script will:
outputs directoryCreate an input file at inputs/input.json with your songs:
[
{
"id": "my_song",
"audio_path": "inputs/reference_audio.mp3",
"lrc_path": "inputs/lyrics.json",
"duration": 180.0,
"prompt_path": "inputs/style_prompt.txt"
}
]
Required files:
python -m jam.inferFor more control over the generation process:
# Basic usage with custom checkpoint
python -m jam.infer evaluation.checkpoint_path=path/to/model.safetensors
# With custom output directory
python -m jam.infer evaluation.checkpoint_path=path/to/model.safetensors evaluation.output_dir=my_outputs
# With custom configuration file
python -m jam.infer config=configs/my_config.yaml evaluation.checkpoint_path=path/to/model.safetensors
Use Accelerate for distributed inference:
# Basic usage with custom checkpoint
accelerate launch --config_path path/to/accelerate/config.yaml jam.infer
# With custom configuration file
accelerate launch --config_path path/to/accelerate/config.yaml jam.infer config=path/to/inference/config.yaml
evaluation.checkpoint_path: Path to model checkpoint (required)evaluation.output_dir: Output directory (default: "outputs")evaluation.test_set_path: Input JSON file (default: "inputs/input.json")evaluation.batch_size: Batch size for inference (default: 1)evaluation.num_samples: Only generate first n samples in test_set_path (null = all)evaluation.vae_type: VAE model type ("diffrhythm" or "stable_audio")evaluation.ignore_style: Ignore style prompts (default: false)evaluation.use_prompt_style: Use text prompts for style (default: false)evaluation.num_style_secs: Style audio duration in seconds (default: 30)evaluation.random_crop_style: Randomly crop style audio (default: false)*.json)[
{"start": 2.2, "end": 2.5, "word": "First word of lyrics"},
{"start": 2.5, "end": 3.7, "word": "Second word of lyrics"},
{"more lines ...."}
]
*.txt)Electronic dance music with heavy bass and synthesizers
input.json)[
{
"id": "unique_song_id",
"audio_path": "path/to/reference.mp3",
"lrc_path": "path/to/lyrics.json",
"duration": 180.0,
"prompt_path": "path/to/style.txt"
}
]
Generated files are saved to the output directory:
outputs/
βββ generated/ # Final trimmed audio files
βββ generated_orig/ # Original generated audio
βββ cfm_latents/ # Intermediate latent representations
βββ local_files/ # Process-specific metadata
βββ generation_config.yaml # Configuration used for generation
evaluation.batch_size=1 for large on limited VRAMaccelerate launch for faster processing of multiple samples--mixed_precision=fp16 to reduce memory usage# Make sure to specify the checkpoint path
python -m jam.infer evaluation.checkpoint_path=path/to/your/model.safetensors
# Reduce batch size or use mixed precision
accelerate launch --mixed_precision=fp16 -m jam.infer evaluation.checkpoint_path=model.safetensors
# Create input.json file in inputs/ directory or specify custom path
python -m jam.infer evaluation.test_set_path=path/to/your/input.json evaluation.checkpoint_path=model.safetensors
The inference.py script automatically downloads the JAM-0.5 model. For manual download:
from huggingface_hub import snapshot_download
model_path = snapshot_download(repo_id="declare-lab/jam-0.5")
If you use JAM in your research, please cite:
@misc{jam2024,
title={JAM: A Tiny Flow-based Song Generator with Fine-grained Controllability and Aesthetic Alignment},
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},
year={2025},
eprint={2507.20880},
archivePrefix={arXiv},
url={https://huggingface.co/papers/2507.20880},
}
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:
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.
For complete license terms, see LICENSE.md and STABILITY_AI_COMMUNITY_LICENSE.md.
For questions, concerns, or collaboration inquiries, please contact the Project Jamify team via the official repository.
For issues and questions:
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.
π£ 29/07/25: We have released JAM-0.5, the first version of the AI song generator from Project Jamify!
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.


Check out the example generated music in the generated_examples/ folder to hear what JAM can produce:
Hybrid Minds, Brodie - Heroin.mp3 - Electronic music with synthesized beats and electronic elementsJade Bird - Avalanche.mp3 - Country music with acoustic guitar and folk influencesRizzle Kicks, Rachel Chinouriri - Follow Excitement!.mp3 - Rap music with rhythmic beats and hip-hop styleThese samples demonstrate JAM's ability to generate high-quality music across different genres while maintaining vocal intelligence, style consistency and musical coherence.
git clone https://github.com/declare-lab/jamify
cd jam
The project includes an automated installation script, run it in your own virtual environment:
bash install.sh
This script will:
requirements.txtIf you prefer manual installation:
# Initialize submodules
git submodule update --init --recursive
# Install dependencies
pip install -r requirements.txt
# Install JAM package
pip install -e .
# Install DeepPhonemizer
pip install -e externals/DeepPhonemizer
The easiest way to run inference is using the provided inference.py script:
python inference.py
This script will:
outputs directoryCreate an input file at inputs/input.json with your songs:
[
{
"id": "my_song",
"audio_path": "inputs/reference_audio.mp3",
"lrc_path": "inputs/lyrics.json",
"duration": 180.0,
"prompt_path": "inputs/style_prompt.txt"
}
]
Required files:
python -m jam.inferFor more control over the generation process:
# Basic usage with custom checkpoint
python -m jam.infer evaluation.checkpoint_path=path/to/model.safetensors
# With custom output directory
python -m jam.infer evaluation.checkpoint_path=path/to/model.safetensors evaluation.output_dir=my_outputs
# With custom configuration file
python -m jam.infer config=configs/my_config.yaml evaluation.checkpoint_path=path/to/model.safetensors
Use Accelerate for distributed inference:
# Basic usage with custom checkpoint
accelerate launch --config_path path/to/accelerate/config.yaml jam.infer
# With custom configuration file
accelerate launch --config_path path/to/accelerate/config.yaml jam.infer config=path/to/inference/config.yaml
evaluation.checkpoint_path: Path to model checkpoint (required)evaluation.output_dir: Output directory (default: "outputs")evaluation.test_set_path: Input JSON file (default: "inputs/input.json")evaluation.batch_size: Batch size for inference (default: 1)evaluation.num_samples: Only generate first n samples in test_set_path (null = all)evaluation.vae_type: VAE model type ("diffrhythm" or "stable_audio")evaluation.ignore_style: Ignore style prompts (default: false)evaluation.use_prompt_style: Use text prompts for style (default: false)evaluation.num_style_secs: Style audio duration in seconds (default: 30)evaluation.random_crop_style: Randomly crop style audio (default: false)*.json)[
{"start": 2.2, "end": 2.5, "word": "First word of lyrics"},
{"start": 2.5, "end": 3.7, "word": "Second word of lyrics"},
{"more lines ...."}
]
*.txt)Electronic dance music with heavy bass and synthesizers
input.json)[
{
"id": "unique_song_id",
"audio_path": "path/to/reference.mp3",
"lrc_path": "path/to/lyrics.json",
"duration": 180.0,
"prompt_path": "path/to/style.txt"
}
]
Generated files are saved to the output directory:
outputs/
βββ generated/ # Final trimmed audio files
βββ generated_orig/ # Original generated audio
βββ cfm_latents/ # Intermediate latent representations
βββ local_files/ # Process-specific metadata
βββ generation_config.yaml # Configuration used for generation
evaluation.batch_size=1 for large on limited VRAMaccelerate launch for faster processing of multiple samples--mixed_precision=fp16 to reduce memory usage# Make sure to specify the checkpoint path
python -m jam.infer evaluation.checkpoint_path=path/to/your/model.safetensors
# Reduce batch size or use mixed precision
accelerate launch --mixed_precision=fp16 -m jam.infer evaluation.checkpoint_path=model.safetensors
# Create input.json file in inputs/ directory or specify custom path
python -m jam.infer evaluation.test_set_path=path/to/your/input.json evaluation.checkpoint_path=model.safetensors
The inference.py script automatically downloads the JAM-0.5 model. For manual download:
from huggingface_hub import snapshot_download
model_path = snapshot_download(repo_id="declare-lab/jam-0.5")
If you use JAM in your research, please cite:
@misc{jam2024,
title={JAM: A Tiny Flow-based Song Generator with Fine-grained Controllability and Aesthetic Alignment},
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},
year={2025},
eprint={2507.20880},
archivePrefix={arXiv},
url={https://huggingface.co/papers/2507.20880},
}
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:
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.
For complete license terms, see LICENSE.md and STABILITY_AI_COMMUNITY_LICENSE.md.
For questions, concerns, or collaboration inquiries, please contact the Project Jamify team via the official repository.
For issues and questions: