AudioLDM2 icon indicating copy to clipboard operation
AudioLDM2 copied to clipboard

not working on OSX

Open davidkamp opened this issue 2 years ago • 6 comments

Hi, Would love to try this out, but I keep getting this error when following the exact install instructions on 0SX 10.15 (intel mac pro)

File "/Users/dk/opt/miniconda3/envs/audioldm/lib/python3.8/site-packages/torch/cuda/__init__.py", line 239, in _lazy_init raise AssertionError("Torch not compiled with CUDA enabled") AssertionError: Torch not compiled with CUDA enabled

I tried adding this environment variable to my .zshrc file, since that was suggested somewhere, but no difference... export PYTORCH_ENABLE_MPS_FALLBACK=1 I'd be very thankful for any help to get this running!

davidkamp avatar Aug 12 '23 14:08 davidkamp

You need to run it on CPU, however, I found that in ddim.py the device is hard-coded by .cuda(). You may need to modify that line. I have tried to fix it in #13 , which is waiting for review.

microboym avatar Aug 13 '23 12:08 microboym

Now you can try this

# Install ffmpeg if you haven't
brew install ffmpeg 

export PYTORCH_ENABLE_MPS_FALLBACK=1
audioldm2 -d CPU -t text 

microboym avatar Aug 15 '23 00:08 microboym

@microboym

Any difference in how you installed it vs README?

escoolioinglesias avatar Aug 15 '23 03:08 escoolioinglesias

@escoolioinglesias You may need to pull the repo again to get the latest update from #13 and reinstall it.

cd AudioLDM2
git pull
pip install -e .

microboym avatar Aug 15 '23 05:08 microboym

@escoolioinglesias Still any problem on the installation?

microboym avatar Aug 15 '23 15:08 microboym

@microboym

Everything is running great, thank you so much for your fix! <3

escoolioinglesias avatar Aug 17 '23 22:08 escoolioinglesias