How to Install Audiocraft Meta AI Audio Generation on Mac and Windows

Meta revealed its next AI tool on Friday, June 9, 2023. It is a deep learning-powered song generator and audio manipulation tool. In contrast to Google’s MusicLM, Audiocraft is an open-source platform that allows users to explore and experiment as much as they like. The model is set up to work with a GPU by default, but Mac users can take use of its capabilities with a little tweak. Today, we’ll get started on learning how to accomplish precisely that.

Also Read:- AudioCraft- Meta Launches Open-Source AI Music Generation Tool

Step By Step Process How to Install Audiocraft Meta AI

Step 1:- Python 3.9 (tested with 3.10) and pip must be installed on your PC.

Step 2:- The setup process is really simple.

Step 3:– To begin, clone the github repository.

git clone https://github.com/facebookresearch/audiocraft
cd audiocraft

Step 4:- Make sure you have pytorch 2.0.1 already installed. If you don’t, then do it by running

pip install ‘torch>=2.0’

Step 5:- (Optional, but strongly advised) Create a virtual environment to avoid the agony of package installation later on.

pip install virtualenv # if you don’t have it already
python -m venv venv
source venv/bin/activate

Step 6:- Now we can proceed to install the rest of the packages with:

pip install -r requirements.txt

Because it involves downloading the model static_dict.bin (2.7 GB) and related files, the duration of this operation may vary depending on your internet connection. Once this is finished, Windows users with high-performance GPUs should be able to continue. The methods below are designed exclusively for Mac users (tested on M1) who prefer to use the CPU instead.

(Only available for Mac) In the repository, open the app.py file and add device=’cpu’ inside the MusicGen.get_pretrained function (line 19, under load_model()):

def load_model(version):
print(“Loading model”, version)
return MusicGen.get_pretrained(version, device=‘cpu’) # add device=’cpu

That’s all! You can create as much music as you like.

Show Buttons
Hide Buttons
error: Content is protected !!