big-sleep
big-sleep copied to clipboard
CUDA must be available in order to use Big Sleep
nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2021 NVIDIA Corporation Built on Sun_Feb_14_22:08:44_Pacific_Standard_Time_2021 Cuda compilation tools, release 11.2, V11.2.152 Build cuda_11.2.r11.2/compiler.29618528_0
I ran into this on windows. I had to custom install pytorch from this page: https://pytorch.org/get-started/locally/
yeah same, you have to install pytorch before doing pip install big_sleep
I ran into this on windows. I had to custom install pytorch from this page: https://pytorch.org/get-started/locally/
This is what I needed to do with a GeForce RTX 2070. I installed CUDA 10.2 for now because it seemed surest bet just to get up and running. Now big-sleep is generating for me.
I ran into this on windows. I had to custom install pytorch from this page: https://pytorch.org/get-started/locally/
This is what I needed to do with a GeForce RTX 2070. I installed CUDA 10.2 for now because it seemed surest bet just to get up and running. Now big-sleep is generating for me.
Windows 11 Pro, Lenovo Legion 82JY Laptop, RTX 3060 GPU here. Running CUDA 11.4:
C:\Users\henryfbp> nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Sun_Aug_15_21:18:57_Pacific_Daylight_Time_2021
Cuda compilation tools, release 11.4, V11.4.120
Build cuda_11.4.r11.4/compiler.30300941_0
I did this, by running conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch -c conda-forge
. I had to:
- uninstall python
- install conda
- run (admin)
conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch -c conda-forge
- run
pip install big-sleep
- run
dream happy sheep
Although now I get a new problem:
C:\Users\henryfbp> dream happy sheep
Key already registered with the same priority: GroupSpatialSoftmax
I have tunnel vision -- I installed the wrong version of cudatoolkit. I want 11.4 (from nvcc --versiont
), not 11.1. 😝
Planning to run this. Will edit comment when conda install
finally finishes.
conda list --revisions
conda install --revision 0
# (or in my case, literally reinstall anaconda because it's faster)
conda install pytorch torchvision torchaudio cudatoolkit=11.4 -c pytorch -c conda-forge
pip install big-sleep
dream happy sheep
EDIT: cudatoolkit=11.4
fails to install. I decided to install cudatoolkit=11.1
and it throws RuntimeError: CUDA out of memory
. I was going to install older CUDA from https://developer.nvidia.com/cuda-11.1.1-download-archive but it didn't fix it.
conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch -c conda-forge
pip install big-sleep
dream happy sheep
EDIT: Got it to work by using --num-cutouts=16 --image-size=128
from https://github.com/lucidrains/big-sleep/issues/99
Make sure you're on Python 3.8 btw, 3.9 & 3.10 don't work.
Make sure you're on Python 3.8 btw, 3.9 & 3.10 don't work.
Not sure if it was me reinstalling cuda or bumping down to Python 3.8 which finally worked. Do we know why, or do you have a reference for that @ThatOneCalculator ?
Make sure you're on Python 3.8 btw, 3.9 & 3.10 don't work.
Not sure if it was me reinstalling cuda or bumping down to Python 3.8 which finally worked. Do we know why, or do you have a reference for that @ThatOneCalculator ?
It's because Python 3.9 broke the cuda package.
What worked for me on Windows was:
- deactivating and removing previously created Big Sleep conda environment with
conda deactivate bigsleep
andconda remove -n bigsleep --all
- deleting bigsleep env folder at
c:\users\my-username\.conda\envs\bigsleep
- creating and activating a new conda environment featuring python 3.8, with
conda create --name bigsleep python=3.8
andconda activate bigsleep
- installing pytorch & cudatoolkit with
conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch
(as per current installation instructions at https://pytorch.org/get-started/locally/ for Windows systems) - installing Big Sleep with
pip install big-sleep
Hope it helps
How do I install Conda for Python 3.8 ?
How do I install Conda for Python 3.8 ?
Just download the full Conda distribution from here https://www.anaconda.com/products/individual
There could be ways to add Conda to an already working Python env but the above approach will work more consistently I believe.
How do I get rid of python 3.9?
(bigsleep) C:\Users\caleb>py --version
Python 3.9.7
(bigsleep) C:\Users\caleb>
How do I get rid of python 3.9?
(bigsleep) C:\Users\caleb>py --version Python 3.9.7 (bigsleep) C:\Users\caleb>
I think you might be in a virtual env, you can run where.exe py
to see where the py
command/exe comes from. I use Pipenv so I only know pipenv --py
to show environment info. Perhaps conda(?) has a similar command.
How do I install Conda for Python 3.8 ?
Just download the full Conda distribution from here https://www.anaconda.com/products/individual
This doesn't work. The "full Conda distribution" currently uses Python 3.9 which breaks Cuda and prevents Big Sleep from running.
How do I install Conda for Python 3.8 ?
Just download the full Conda distribution from here https://www.anaconda.com/products/individual
This doesn't work. The "full Conda distribution" currently uses Python 3.9 which breaks Cuda and prevents Big Sleep from running.
Maybe you could try an older Conda release? I will check what version I have on the windows laptop running CUDA.
Quoting @calebrader:
This doesn't work. The "full Conda distribution" currently uses Python 3.9 which breaks Cuda and prevents Big Sleep from running.
You are in luck, conda handles package management even of Python itself, and @illtellyoulater actually provides an answer above that shows this in action.
Look at the conda docs where they explain in more detail.
tl;dr re-read his message and try that. The line that does the trick is this one:
conda create --name bigsleep python=3.8