Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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.
- # check CUDA version
- nvcc --version
- #check Nvidia Driver info:
- nvidia-smi
- 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.
- I have the latest Nvidia driver so my driver CUDA was 2.something and the nvcc was still 11.8
- everything is easier if you have Anaconda installed cd to user/generative-models
- conda create -n genModelVideo python=3.10.11
- conda activate genModelVideo
- then run through the instructions I'm sure you're already looking at from yesterday about getting this running
- before you hit
- pip install -r requirements/pt2.txt
- you should make sure the requirements/pt2.txt file has +cu118 set on these guys:
- torch>=2.0.1+cu118
- torchaudio>=2.0.2+cu118
- torchvision>=0.15.2+cu118
- Dragon — Today at 12:10 PM
- this is where things kept screwing up for me
- the torch cached by conda was the CPU one not the CUDA 11.8 one
- so after running pip install -r requirements/pt2.txt you need to check if python sees the CUDA torch or not
- to do that you just run python from CLI and then
- >>>import torch
- >>>torch.cuda.is_available()
- once it returns true you're good to go with starting streamlit
- streamlit run video_sampling.py
- if conda keeps giving you CPU torch then running torch.cuda.is_available() will return false and you need to uninstall the torch packages
- you can uninstall with
- pip3 uninstall torch torchvision torchaudio
- you might also need to run
- conda uninstall torch torchvision torchaudio
- 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.
- maybe even try both 😉
- after that to meet the requirements we need those specific torch versions
- I finally got them successfully installed with
- conda install pytorch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 pytorch-cuda=11.8 -c pytorch -c nvidia
- after that you don't want to run pip install -r requirements/pt2.txt again or it might try uninstalling things
- finally i ran the pip install .
- command and then started streamit
- and it all worked
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement