MAGNeT : AI from META to generate music on your Mac Silicon

Christophe Verdier
2 min readJan 22, 2024

This tutorial is a step by step guide to run audiocraft and MAGNeT on you Mac Silicon.

Introduction

META recently released MAGNeT: Masked Audio Generation using a Single Non-Autoregressive Transformer in OpenSource.

Unfortunately, this implementation rely on audiocraft which use xformers which is known to work only on CUDA devices.

Some modifications are required to use MAGNeT on you Mac Silicon, however it does not support MPS yet (working on it) and therefore runs on your Mac CPU.

Step by steps tutorial

Open a terminal.

First install brew on your Mac, then install ffmpeg :

brew install ffmpeg

Clone the respository :

https://github.com/ezeeFlop/audiocraft

then

cd audiocraft

Create a python venv and install the dependencies :

python3 -m venv .venv

source .venv/bin/activate

pip install — upgrade pip

pip install -r requirements.txt

--

--

Christophe Verdier

AI expert & Sponge Theory founder, Christophe Verdier, specializes in innovative web/mobile apps and AI solutions using Python, Node.JS, and Flutter.