Closed illtellyoulater closed 2 years ago
Not sure what is happening here, but you should try to aim for a GPU if possible.
See the comment in the notebook:
# This notebook supports both CPU and GPU.
# On CPU, generating one sample may take on the order of 20 minutes.
# On a GPU, it should be under a minute.
CPU mode takes 20 times more computation time than GPU mode.
I know, but my current GPU doesn't have enough VRAM... that's why I was running in CPU mode. In my case I'm getting a new GPU soon, but think it would still be cool if this could still work on CPU...
Yes, sure. In the meantime, try to use a free GPU on Google Colab.
@woctezuma I finally got hold of a new GPU with 6 GB VRAM... so I am now running again the clip_guided notebook in GPU mode, but I am seeing exactly the same error I documented above...
Thanks! I saw them already but I don't have the necessary ML & rel. libs knowledge to properly make use of them... I also already tried kind of blindly playing with those types and their conversion, but without success... Honestly, I see it very hard I can come up with something useful just by myself... 🤷♂️
It could be just a simple change of this line:
You could try to replace:
F.embedding(cast(torch.Tensor, t), self.w_t)
with either:
F.embedding(cast(torch.Tensor, t.long()), self.w_t)
or:
F.embedding(cast(torch.Tensor, t).long(), self.w_t)
Ok, thanks! Now at least in CPU mode it works! In GPU mode a completely black image is generated (at some points tensors become NaN), but I'll open another thread for that, as it must be caused by a different problem.
When I run clip_guided notebook in CPU mode, I get the following error at the "Sample from the base model" cell:
Can anyone help? Thanks!