Giter VIP home page Giter VIP logo

Comments (8)

illtellyoulater avatar illtellyoulater commented on August 27, 2024 1

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.

from glide-text2im.

woctezuma avatar woctezuma commented on August 27, 2024

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.

from glide-text2im.

illtellyoulater avatar illtellyoulater commented on August 27, 2024

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...

from glide-text2im.

woctezuma avatar woctezuma commented on August 27, 2024

Yes, sure. In the meantime, try to use a free GPU on Google Colab.

from glide-text2im.

illtellyoulater avatar illtellyoulater commented on August 27, 2024

@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...

from glide-text2im.

woctezuma avatar woctezuma commented on August 27, 2024

Try:

from glide-text2im.

illtellyoulater avatar illtellyoulater commented on August 27, 2024

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... 🤷‍♂️

from glide-text2im.

woctezuma avatar woctezuma commented on August 27, 2024

It could be just a simple change of this line:

sot = (
self.pred_state[None, None].expand(x.shape[0], -1, -1)
if self.n_timestep == 0
else F.embedding(cast(torch.Tensor, t), self.w_t)[:, None]
)

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)

from glide-text2im.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.