Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2023
837
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 1 0
  1. Yes, I am on W11, with 4090. You need to really check over what version of Torch python is actually seeing because I kept trying to install the PyTorch 2.0.1 with CUDA 11.8 but it kept seeing some cached copy that used the CPU instead and that broke everything.
  2. # check CUDA version
  3. nvcc --version
  4. #check Nvidia Driver info:
  5. nvidia-smi
  6. nvcc --version will show you which version Python will use and nvidia-smi shows which one comes from the driver for your card, it's normal if they don't match.
  7. I have the latest Nvidia driver so my driver CUDA was 2.something and the nvcc was still 11.8
  8. everything is easier if you have Anaconda installed cd to user/generative-models
  9. conda create -n genModelVideo python=3.10.11
  10. conda activate genModelVideo
  11. then run through the instructions I'm sure you're already looking at from yesterday about getting this running
  12. before you hit
  13. pip install -r requirements/pt2.txt
  14. you should make sure the requirements/pt2.txt file has +cu118 set on these guys:
  15. torch>=2.0.1+cu118
  16. torchaudio>=2.0.2+cu118
  17. torchvision>=0.15.2+cu118
  18. Dragon — Today at 12:10 PM
  19. this is where things kept screwing up for me
  20. the torch cached by conda was the CPU one not the CUDA 11.8 one
  21. so after running pip install -r requirements/pt2.txt you need to check if python sees the CUDA torch or not
  22. to do that you just run python from CLI and then
  23. >>>import torch
  24. >>>torch.cuda.is_available()
  25. once it returns true you're good to go with starting streamlit
  26. streamlit run video_sampling.py
  27. if conda keeps giving you CPU torch then running torch.cuda.is_available() will return false and you need to uninstall the torch packages
  28. you can uninstall with
  29. pip3 uninstall torch torchvision torchaudio
  30. you might also need to run
  31. conda uninstall torch torchvision torchaudio
  32. after the pip unstall just to be sure. If you run these commands a few times until it says it can;t find what you want uninstalled then you're good to reinstall.
  33. maybe even try both 😉
  34. after that to meet the requirements we need those specific torch versions
  35. I finally got them successfully installed with
  36. conda install pytorch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 pytorch-cuda=11.8 -c pytorch -c nvidia
  37. after that you don't want to run pip install -r requirements/pt2.txt again or it might try uninstalling things
  38. finally i ran the pip install .
  39. command and then started streamit
  40. and it all worked
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement