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.
MIT License
20.14k stars 2.01k forks source link

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

Open kahkitng98 opened 3 months ago

kahkitng98 commented 3 months ago

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

Erichy-dev commented 3 months ago

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

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

LordMidi commented 3 months ago

same here - using Colab files from Huggingface

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

gitbarlew commented 2 months ago

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