Generated images are completely black?! 😵 What am I doing wrong?
See original GitHub issueHello, I am on Windows 10, and my gpu is a PNY Nvidia GTX 1660 TI 6 Gb. I installed Big Sleep like so:
conda create --name bigsleep python=3.8
conda activate bigsleep
conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch
(as per Pytorch website instructions)pip install big-sleep
The problem is that when I launch dream --text="a beautiful mind" --num-cutouts=64 --image-size=512 --save_every=10 --seed=12345
the generated images are completely black (although the inference process seems to run nicely and without errors).
Things I’ve tried:
- installing previous pytorch version with
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
- removing the big-sleep conda environment completely and recreating it anew
- uninstalling nvidia drivers and performing a new clean driver install (I tried both Nvidia Studio drivers and Nvidia Game Ready drivers)
- uninstalling and reinstalling Conda completely
But nothing helped… and at this point I don’t know what else to try…
The only interesting piece of information I could gather is that for some reason this problem also happens with another text-to-image project called v-diffusion-pytorch where similar to Big Sleep the inference process appears to run correctly but the generated images are all black.
I think there must be some simple detail I’m overlooking… which it’s making me go insane… 😵 Please let me know something if you think you can help! THANKS !
Issue Analytics
- State:
- Created 2 years ago
- Comments:7
Top GitHub Comments
I fixed it!
Apparently the problem was that the cuda toolkit version I was installing with the conda package (11.3) was not recent enough to match my video drivers.
So I uninstalled the conda packages for torch, torchvision and cudatoolkit, and I installed torch and torchvision via pip, paying attention to pick a version which embedded a much more recent cuda toolkit version (11.5):
pip3 install torch==1.11.0+cu115 -f https://download.pytorch.org/whl/torch_stable.html pip3 install torchvision==0.12.0+cu115 -f https://download.pytorch.org/whl/torch_stable.html
Now I can happily dream! 😉 Thanks again for your help and to all those who have worked on this!
Btw, the other project which was also generating black images (glide-text2im), did not benefit from this fix, so it was just a coincidence! And it has to be caused by something else…
@illtellyoulater I had to reinstall numpy 1.22.3, but your trick works, thanks a lot 😃