Comments (10)
ah! it happens when run in "cpu" mode. if you do have gpu make sure to run
pip3 install --upgrade torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu117
to get a version of torch that supports GPU. I'll update README and add handling for CPU so it doesn't die from using half's
YES, thank you this fixed it. Weird I have a 3090..
I am able to run locally in browser!
from clip-interrogator.
ah it looks like you're running the .ipynb Jupyter notebook and it is trying to run wget
command to download the cached preprocessed files. instead I'd recommend running pip install gradio
and then python3 run_gradio.py
that'll give you a nice web ui to use locally.
I'll also look into changing the notebook away from using wget 👍
from clip-interrogator.
ah! it happens when run in "cpu" mode. if you do have gpu make sure to run
pip3 install --upgrade torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu117
to get a version of torch that supports GPU.
I'll update README and add handling for CPU so it doesn't die from using half's
from clip-interrogator.
ok instructions updated and version 0.3.1 that handles running on CPU again published!
Was this pushed? I don't see any CPU specific instructions in the README and I'm still hitting the float/half error.
from clip-interrogator.
thanks!, @pharmapsychotic getting this now
Loading CLIP model...
Preprocessing artists: 0%| | 0/5 [00:01<?, ?it/s]
Traceback (most recent call last):
File "\clip-interrogator\run_gradio.py", line 11, in <module>
ci = Interrogator(Config(cache_path="cache", clip_model_path="cache"))
File "\clip-interrogator\clip_interrogator\clip_interrogator.py", line 70, in __init__
self.load_clip_model()
File "\clip-interrogator\clip_interrogator\clip_interrogator.py", line 105, in load_clip_model
self.artists = LabelTable(artists, "artists", self.clip_model, self.tokenize, config)
File "\clip-interrogator\clip_interrogator\clip_interrogator.py", line 268, in __init__
text_features = clip_model.encode_text(text_tokens)
File "AppData\Local\Programs\Python\Python310\lib\site-packages\open_clip\model.py", line 192, in encode_text
x = self.transformer(x, attn_mask=self.attn_mask)
File "\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "AppData\Local\Programs\Python\Python310\lib\site-packages\open_clip\transformer.py", line 230, in forward
x = r(x, attn_mask=attn_mask)
File "AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "AppData\Local\Programs\Python\Python310\lib\site-packages\open_clip\transformer.py", line 154, in forward
x = x + self.ls_1(self.attention(self.ln_1(x), attn_mask=attn_mask))
File "AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "AppData\Local\Programs\Python\Python310\lib\site-packages\open_clip\transformer.py", line 18, in forward
x = F.layer_norm(x.to(torch.float32), self.normalized_shape, self.weight, self.bias, self.eps)
File "\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\functional.py", line 2515, in layer_norm
return torch.layer_norm(input, normalized_shape, weight, bias, eps, torch.backends.cudnn.enabled)
RuntimeError: expected scalar type Float but found Half
from clip-interrogator.
thanks, in a fresh environment I get that too but not in my other environments 🤔 it may be difference in behavior with different torch version, I'm investigating!
from clip-interrogator.
ok instructions updated and version 0.3.1 that handles running on CPU again published!
from clip-interrogator.
@pharmapsychotic Getting an error now that GPU is not available with last update. Is there a way to not use CPU?
CUDA is not available, using CPU. Warning: this will be very slow!
from clip-interrogator.
@screan check to make sure your installed torch has cuda enabled
python
import torch
torch.cuda.is_available()
from clip-interrogator.
@pharmapsychotic thanks reinstalled cuda tools / pytorch. all working now. appreciate it.
from clip-interrogator.
Related Issues (20)
- Only keeping flavors.txt and removing other data files HOT 1
- Clip Interrogator EXT issue - incorrect prompt
- Interrogator 1: RuntimeError: The size of tensor a (3) must match the size of tensor b (9) at non-singleton dimension 0
- How to speed up? Which torch version is suggested HOT 3
- How to set lowvram mode on via settings?
- two errors
- Prompt generation issiue
- timing interrogation
- Is there any way to only return caption without tag
- Error occurred when executing ClipInterrogator: Remote end closed connection without response HOT 1
- How to set interrogation mode when used in another script?
- cannot find python: which version HOT 1
- Are there any expansion plans for comfyui? HOT 6
- run_cli.py just freezes? import open_clip freezes? HOT 1
- Exception <class 'RuntimeError'> HOT 4
- Does clip-interrogator have built-in queue processing? HOT 1
- Downloads BLIP Checkpoint every time HOT 2
- What does "Ranking against your own list of terms?" mean?
- SD crashed after install CLIP, how to fix it or remove it?
- Loading flavors.txt is very slow HOT 2
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 clip-interrogator.