HKUSTAudio / VidMuse

huggingface.co
Total runs: 1.3K
24-hour runs: 0
7-day runs: 6
30-day runs: 1.2K
Model's Last Updated: May 09 2025

Introduction of VidMuse

Model Details of VidMuse

VidMuse

VidMuse: A Simple Video-to-Music Generation Framework with Long-Short-Term Modeling

[TL;DR]: VidMuse is a framework for generating high-fidelity music aligned with video content, utilizing Long-Short-Term modeling, and has been accepted to CVPR 2025.

Links
  • Paper : Explore the research behind VidMuse.
  • Project : Visit the official project page for more information and updates.
  • Dataset : Download the dataset used in the paper.
Clone the repository
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/HKUSTAudio/VidMuse
cd VidMuse
Usage
  1. First install the VidMuse library
conda create -n VidMuse python=3.9
conda activate VidMuse
pip install git+https://github.com/ZeyueT/VidMuse.git
  1. Install ffmpeg: Install ffmpeg:
sudo apt-get install ffmpeg
# Or if you are using Anaconda or Miniconda
conda install "ffmpeg<5" -c conda-forge
  1. Run the following Python code:
from video_processor import VideoProcessor, merge_video_audio
from audiocraft.models import VidMuse
import scipy

# Path to the video
video_path = 'sample.mp4'
# Initialize the video processor
processor = VideoProcessor()
# Process the video to obtain tensors and duration
local_video_tensor, global_video_tensor, duration = processor.process(video_path)

progress = True
USE_DIFFUSION = False

# Load the pre-trained VidMuse model
MODEL = VidMuse.get_pretrained('HKUSTAudio/VidMuse')
# Set generation parameters for the model based on video duration
MODEL.set_generation_params(duration=duration)

try:
    # Generate outputs using the model
    outputs = MODEL.generate([local_video_tensor, global_video_tensor], progress=progress, return_tokens=USE_DIFFUSION)
except RuntimeError as e:
    print(e)

# Detach outputs from the computation graph and convert to CPU float tensor
outputs = outputs.detach().cpu().float()


sampling_rate = 32000
output_wav_path = "vidmuse_sample.wav"
# Write the output audio data to a WAV file
scipy.io.wavfile.write(output_wav_path, rate=sampling_rate, data=outputs[0, 0].numpy())

output_video_path = "vidmuse_sample.mp4"
# Merge the original video with the generated music
merge_video_audio(video_path, output_wav_path, output_video_path)
Citation

If you find our work useful, please consider citing:

@article{tian2024vidmuse,
  title={Vidmuse: A simple video-to-music generation framework with long-short-term modeling},
  author={Tian, Zeyue and Liu, Zhaoyang and Yuan, Ruibin and Pan, Jiahao and Liu, Qifeng and Tan, Xu and Chen, Qifeng and Xue, Wei and Guo, Yike},
  journal={arXiv preprint arXiv:2406.04321},
  year={2024}
}

Runs of HKUSTAudio VidMuse on huggingface.co

1.3K
Total runs
0
24-hour runs
2
3-day runs
6
7-day runs
1.2K
30-day runs

More Information About VidMuse huggingface.co Model

More VidMuse license Visit here:

https://choosealicense.com/licenses/cc-by-4.0

VidMuse huggingface.co

VidMuse huggingface.co is an AI model on huggingface.co that provides VidMuse's model effect (), which can be used instantly with this HKUSTAudio VidMuse model. huggingface.co supports a free trial of the VidMuse model, and also provides paid use of the VidMuse. Support call VidMuse model through api, including Node.js, Python, http.

HKUSTAudio VidMuse online free

VidMuse huggingface.co is an online trial and call api platform, which integrates VidMuse's modeling effects, including api services, and provides a free online trial of VidMuse, you can try VidMuse online for free by clicking the link below.

HKUSTAudio VidMuse online free url in huggingface.co:

https://huggingface.co/HKUSTAudio/VidMuse

VidMuse install

VidMuse is an open source model from GitHub that offers a free installation service, and any user can find VidMuse on GitHub to install. At the same time, huggingface.co provides the effect of VidMuse install, users can directly use VidMuse installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

VidMuse install url in huggingface.co:

https://huggingface.co/HKUSTAudio/VidMuse

Url of VidMuse

Provider of VidMuse huggingface.co

HKUSTAudio
ORGANIZATIONS

Other API from HKUSTAudio

huggingface.co

Total runs: 4.1K
Run Growth: 1.8K
Growth Rate: 48.96%
Updated:June 25 2026
huggingface.co

Total runs: 1.0K
Run Growth: 690
Growth Rate: 70.12%
Updated:May 10 2025
huggingface.co

Total runs: 981
Run Growth: 457
Growth Rate: 48.36%
Updated:March 09 2025
huggingface.co

Total runs: 372
Run Growth: -241
Growth Rate: -70.47%
Updated:May 10 2025
huggingface.co

Total runs: 233
Run Growth: -58
Growth Rate: -26.36%
Updated:February 18 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:June 17 2026