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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generated images are completely black?! 馃樀 What am I doing wrong? #15
Comments
I'm not entirely sure what's going on but if you are getting an all black image it is probably because at some point during the inference process a value becomes NaN (due to floating point overflow or some other problem) and this NaN propagates to the entire image and it is displayed as black. This is probably happening with Big Sleep too but I don't know why there either... |
@crowsonkb you nailed it :) This is exactly what's happening at least for Big Sleep where I reported the image containing NaN values with more detail: please see lucidrains/big-sleep#129 (comment). I really hope you could be able to provide some more valuable insight! I'm very inexperienced in ML and related libraries, so I cannot fully debug this on my own, however I need to do it because I'm a little concerned those problems could be due to the recent gpu I got (PNY Nvidia GTX 1660 TI 6 Gb) so I will have to find out and in case it's faulty I will have to return it... I know it seems unlikely, but why am I the only one facing this issue? 馃様 Just when I was so excited that with my new purchase I could finally be able to run bigger models, now I have to deal with this weird mysterious problem... |
Hey @crowsonkb, hold on, look at this! In fact I've just found out that in my case glide-text2im is also generating black images!!! 馃槷 Now this is starting to get a little weird, isn't it ? |
That is really weird! If you run cc12m_1_cfg in CPU mode (use |
Yes, right! Not black at all! I get a very colorful image using CPU... This is so puzzling and frustrating at the same... |
I would really suspect the GPU might be bad at this point tbh. |
Just a quick update. I think we can rule out the option of a faulty GPU, as I could finally make it work with BigSleep and a couple of other projects. In those cases the solution was installing the latest version of torch with pip, like so: However this did not work for both |
Ok apparently it seems that for some reason I'm only having problems with projects involving What could it be that prevents OpenAI models in particular from working as expected? |
Provide links to:
Then compare the requirements. |
I fixed it by installing (with pip) a version of Torch that includes CUDA Toolkit v10.2, like this:
With any CUDA Toolkit version higher than that it would not work... not sure if this strict requirement comes from my system's particular configuration, or this project, or the CLIP project.. Anyway, using v10.2 was enough to make To also fix that I had to make the following change to clip.py, at line 118: https://github.com/openai/CLIP/blob/main/clip/clip.py#L118-L123 where, before the if condition, I had to add:
in order to force this model.
That's it! |
Hello,
I am on Windows 10, and my gpu is a PNY Nvidia GTX 1660 TI 6 Gb.
I installed V-Diffusion like so:
conda create --name v-diffusion python=3.8
conda activate v-diffusion
conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch
(as per Pytorch website instructions)pip install requests tqdm
The problem is that when I launch the
cfg_sample.py
orclip_sample.py
command lines, the generated images are completely black, although the inference process seems to run nicely and without errors.Things I've tried:
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 Big Sleep where similar to V-Diffusion 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 !
The text was updated successfully, but these errors were encountered: