Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

MusicGPT

> AI 编程
Open source

Generate music based on natural language prompts using LLMs running locally

1.4K stars0 likes2 views
WebsiteGitHub

About

Generate music based on natural language prompts using LLMs running locally

MusicGPT

Generate music based on natural language prompts using LLMs running locally.

https://github.com/gabotechs/MusicGPT/assets/45515538/f0276e7c-70e5-42fc-817a-4d9ee9095b4c

☝️ Turn up the volume!

Overview

MusicGPT is an application that allows running the latest music generation AI models locally in a performant way, in any platform and without installing heavy dependencies like Python or machine learning frameworks.

Right now it only supports MusicGen by Meta, but the plan is to support different music generation models transparently to the user.

The main milestones for the project are:

  • Text conditioned music generation
  • Melody conditioned music generation
  • Indeterminately long / infinite music streams

Install

Mac and Linux

MusicGPT can be installed on Mac and Linux using brew:

bash
brew install gabotechs/taps/musicgpt

Windows

Download and install MusicGPT's executable file following this link.

All platforms

Precompiled binaries are available for the following platforms:

  • macOS Apple Silicon
  • Linux x86_64
  • Windows

Just downloading them and executing them should be enough.

Docker (Recommend for running with CUDA)

If you want to run MusicGPT with a CUDA enabled GPU, this is the best way, as you only need to have the basic NVIDIA drivers installed in your system.

bash
docker pull gabotechs/musicgpt

Once the image is downloaded, you can run it with:

bash
docker run -it --gpus all -p 8642:8642 -v ~/.musicgpt:/root/.local/share/musicgpt gabotechs/musicgpt --gpu --ui-expose

With cargo

If you have the Rust toolchain installed in your system, you can install it with cargo.

bash
cargo install musicgpt

Usage

There are two ways of interacting with MusicGPT: the UI mode and the CLI mode.

UI mode

This mode will display a chat-like web application for exchanging prompts with the LLM. It will:

  • store your chat history
  • allow you to play the generated music samples whenever you want
  • generate music samples in the background
  • allow you to use the UI in a device different from the one executing the LLMs

You can run the UI by just executing the following command:

bash
musicgpt

You can also choose different models for running inference, and whether to use a GPU or not, for example:

bash
musicgpt --gpu --model medium

[!WARNING]
Most models require really powerful hardware for running inference

If you want to use a CUDA enabled GPU, it's recommended that you run MusicGPT with Docker:

bash
docker run -it --gpus all -p 8642:8642 -v ~/.musicgpt:/root/.local/share/musicgpt gabotechs/musicgpt --ui-expose --gpu

CLI mode

This mode will generate and play music directly in the terminal, allowing you to provide multiple prompts and playing audio as soon as it's generated. You can generate audio based on a prompt with the following command:

bash
musicgpt "Create a relaxing LoFi song"

By default, it produces a sample of 10s, which can be configured up to 30s:

bash
musicgpt "Create a relaxing LoFi song" --secs 30

There's multiple models available, it will use the smallest one by default, but you can opt into a bigger model:

bash
musicgpt "Create a relaxing LoFi song" --model medium

[!WARNING]
Most models require really powerful hardware for running inference

If you want to use a CUDA enabled GPU, it's recommended that you run MusicGPT with Docker:

bash
docker run -it --gpus all -v ~/.musicgpt:/root/.local/share/musicgpt gabotechs/musicgpt --gpu "Create a relaxing LoFi song"

You can review all the options available running:

bash
musicgpt --help

Benchmarks

The following graph shows the inference time taken for generating 10 seconds of audio using different models on a Mac M1 Pro. For comparison, it's Python equivalent using https://github.com/huggingface/transformers is shown.

The command used for generating the 10 seconds of audio was:

bash
musicgpt '80s pop track with bassy drums and synth'
This is the Python script used for generating the 10 seconds of audio
…

Storage

MusicGPT needs access to your storage in order to save downloaded models and generated audios along with some metadata needed for the application to work properly. Assuming your username is foo, it will store the data in the following locations:

  • Windows: C:\Users\foo\AppData\Roaming\gabotechs\musicgpt
  • MacOS: /Users/foo/Library/Application\ Support/com.gabotechs.musicgpt
  • Linux: /home/foo/.config/musicgpt

License

The code is licensed under a MIT License, but the AI model weights that get downloaded at application startup are licensed under the CC-BY-NC-4.0 License as they are generated based on the following repositories:

  • https://huggingface.co/facebook/musicgen-small
  • https://huggingface.co/facebook/musicgen-medium
  • https://huggingface.co/facebook/musicgen-large
  • https://huggingface.co/facebook/musicgen-melody

Issues· 21 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustaigptllmmachine-learning

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
CategoryAI 编程
PricingOpen source

> Related tools

G
GitHub Copilot
GitHub 官方 AI 编程助手,覆盖补全、Chat 与 Agent 模式。
C
Cursor
AI 原生代码编辑器,对话改代码、多文件 Agent 与规则体系是其核心。
S
skills
Skills for Real Engineers. Straight from my .agents directory.