Comments (8)
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.
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.
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.
Yes, sure. In the meantime, try to use a free GPU on Google Colab.
from glide-text2im.
@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.
Try:
- pytorch/captum#405 (comment)
- huggingface/transformers#7026 (comment)
- https://forums.fast.ai/t/eembedding-error-expected-tensor-for-argument-1-indices-to-have-scalar-type-long-but-got-torch-floattensor-instead/41045/7
from glide-text2im.
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.
It could be just a simple change of this line:
glide-text2im/glide_text2im/clip/encoders.py
Lines 123 to 127 in 9cc8e56
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)
- Larger batch size to generate images in text2im.ipynb? HOT 2
- Training parameters
- In GPU mode generated image is all black with NaN tensor values (no problems in CPU mode) HOT 8
- Better resolution images for inpainting HOT 4
- Has the inpainting Colab been developed with the CLIP-guided version?
- disappointed, looks the model is poor for unseen data HOT 2
- In the clipped guided version, were GLIDE (filtered) and CLIP trained together?
- Question about the CLIP model HOT 2
- Question about generating masks
- YouTube video walk-through of this codebase
- How could I load a mask generated by myself? HOT 2
- Ways to reduce number of failed inpaints?
- Fixing Random Seed
- About CLIP training on nosied images
- Experimental IS and FID values without classifier guidance and CLIP guidance
- Inpaiting fin-tune details HOT 1
- How can i use .py file to run project in pycharm?
- Something wrong with upsample-inpaint checkpoint
- Is the formula for CFG different from the reference?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glide-text2im.