AudioLDM
AudioLDM copied to clipboard
Torch not compiled with CUDA (Windows support?)
I followed the instructions but kept getting complaints that "Torch not compiled with CUDA enabled".
I tried switching Torch to the CU variants, but that only resulting in cascading complaints regarding missing DLLs.
Has this repository been tested in a windows environment? (Or am I on a fool's errand?)
return func(*args, **kwargs)
File "G:\Audio\audioldm-text-to-audio-generation\audioldm\latent_diffusion\ddim.py", line 127, in sample
self.make_schedule(ddim_num_steps=S, ddim_eta=eta, verbose=verbose)
File "G:\Audio\audioldm-text-to-audio-generation\audioldm\latent_diffusion\ddim.py", line 43, in make_schedule
self.register_buffer("betas", to_torch(self.model.betas))
File "G:\Audio\audioldm-text-to-audio-generation\audioldm\latent_diffusion\ddim.py", line 25, in register_buffer
attr = attr.to(torch.device("cuda"))
File "C:\Users\RandomName\anaconda3\envs\audioldm\lib\site-packages\torch\cuda\__init__.py", line 221, in _lazy_init
raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled
It sounds like you installed PyTorch without CUDA support. https://pytorch.org/ has instructions for how to install pytorch with cuda support. Thanks.
I'm a newbie to this, so for others peering into this issue...
The Torch variants that are automatically installed into the environment don't seem to be the full thing (uncertain how this works). Going to PyTorch, selecting a full CUDA environment (CUDA 11.6 in my case) and installing it does work. (Though resolving the environment takes a long time)
You also need to do a 'conda install ffmpeg' in order for the gradio interface to work correctly.
Additionally, AudioLDM automatically sets up a public Gradio share link, this can be disabled by setting 'iface.launch(share=True)' in 'app.py' to 'False'.
pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113
Worked for me
conda install pytorch torchvision torchaudio pytorch-cuda=11.6 -c pytorch -c nvidia
worked for me as well
Stuck on the same issue. I don't have nvidia gpu. Installed pytorch with cuda support using https://pytorch.org/get-started/locally/ but this also did not work. I have Intel 620 GPU in laptop and probably this will not support audioldm.
It seems like a simple requirements.txt file would sort this out quite easily. Can we get one? It's now October and the same thing is happening.