Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Torch not compiled with CUDA (Windows support?) #5

Open
zslittlehelper opened this issue Feb 4, 2023 · 6 comments
Open

Torch not compiled with CUDA (Windows support?) #5

zslittlehelper opened this issue Feb 4, 2023 · 6 comments

Comments

@zslittlehelper
Copy link

zslittlehelper commented Feb 4, 2023

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
@haoheliu
Copy link
Owner

haoheliu commented Feb 4, 2023

It sounds like you installed PyTorch without CUDA support. https://pytorch.org/ has instructions for how to install pytorch with cuda support. Thanks.

@zslittlehelper
Copy link
Author

zslittlehelper commented Feb 5, 2023

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'.

@Fictiverse
Copy link

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

@rne1223
Copy link

rne1223 commented Mar 1, 2023

conda install pytorch torchvision torchaudio pytorch-cuda=11.6 -c pytorch -c nvidia

worked for me as well

@parjanyaacoder
Copy link

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.

@Aptronymist
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants