facebookresearch / audiocraft

Audiocraft is a library for audio processing and generation with deep learning. It features the state-of-the-art EnCodec audio compressor / tokenizer, along with MusicGen, a simple and controllable music generation LM with textual and melodic conditioning.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AttributeError: module 'audiocraft' has no attribute '__version__' when running on Google Colab

kahkitng98 opened this issue · comments

There seems to be an error in loading the model when trying to run the codes on Google Colab whereby it gives the following error as attached.

Screenshot 2024-03-29 150209

make sure you're using the correct torch version & the supported dependencies.. torch===2.1.0

https://pytorch.org/get-started/previous-versions/

same here - using Colab files from Huggingface

https://huggingface.co/facebook/musicgen-stereo-medium

I had the same issue, in my case I fixed it by forcing a compatible torch vision 0.16.0 version (matching torch and torch audio = 2.1.0) - make sure to start with clean colab environment, my pip installation looks like this now:
!pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu121