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

pyannote uninstalling torch cuda and install torch cpu #1675

Open
versus666jzx opened this issue Mar 18, 2024 · 8 comments
Open

pyannote uninstalling torch cuda and install torch cpu #1675

versus666jzx opened this issue Mar 18, 2024 · 8 comments

Comments

@versus666jzx
Copy link

versus666jzx commented Mar 18, 2024

Tested versions

  • Reproducible in Version 3.1.1

System information

win11, pyannote.audio 3.1.1

Issue description

If I install pyannote.audio in an env in which torch with cuda is already installed, then during installation the torch with cuda is removed and torch cpu is installed. Even though the torch versions satisfy requirements.txt.

image

Minimal reproduction example (MRE)

pip install torch torchaudio --index-url https://download.pytorch.org/whl/cu118
pip install pyannote.audio

@Valeronich
Copy link

Same problem omg

@gdk00
Copy link

gdk00 commented Mar 18, 2024

Struggled with that too...

@beton18
Copy link

beton18 commented Mar 18, 2024

same issue

@hbredin
Copy link
Member

hbredin commented Mar 18, 2024

I'd suggest using the same --index-url when installing pyannote.audio.

pip install pyannote.audio --index-url https://download.pytorch.org/whl/cu118

@versus666jzx
Copy link
Author

I'd suggest using the same --index-url when installing pyannote.audio.

pip install pyannote.audio --index-url https://download.pytorch.org/whl/cu118

Expectedly doesn't work.

image

@versus666jzx
Copy link
Author

versus666jzx commented Mar 18, 2024

But if use this

pip install pyannote.audio --extra-index-url https://download.pytorch.org/whl/cu118

then torch and torchaudio packages with cuda support will be installed

image

It would be cool if this was somehow reflected in the installation documentation or if the requirements.txt or setup files were corrected.

@hbredin
Copy link
Member

hbredin commented Mar 18, 2024

It would be cool if you could open a PR fixing this now that you have found a solution.

@ThatJeffGuy
Copy link

But if use this

pip install pyannote.audio --extra-index-url https://download.pytorch.org/whl/cu118

then torch and torchaudio packages with cuda support will be installed

image

It would be cool if this was somehow reflected in the installation documentation or if the requirements.txt or setup files were corrected.

Hey friend, am trying to get this to work myself, but after running this, it yells at me about torchvision.
Error importing pyannote.audio, torch, torchvision, or torchaudio: No module named 'torchvision'

I use this script that our lovely AI overlord generated for me to check my environment:

import torch
import torchaudio
import torchvision
import speechbrain

print("PyTorch Version:", torch.__version__)
print("CUDA Available:", torch.cuda.is_available())
print("CUDA Version:", torch.version.cuda)
print("torchaudio version:", torchaudio.__version__)
print("torchvision version:", torchvision.__version__)
print("speechbrain version:", speechbrain.__version__)

# Check if CUDA is available
print("CUDA available:", torch.cuda.is_available())
if torch.cuda.is_available():
    print("CUDA device name:", torch.cuda.get_device_name(0))

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