Comments (5)
Hi @coni-coco, we build xformer from source using commit https://github.com/facebookresearch/xformers/tree/7e05e2caaaf8060c1c6baadc2b04db02d5458a94
But we believe using the latest version of pytorch & xformer also works.
from eva.
@Yuxin-CV
File "/usr/src/EVA-master/EVA-02/det/detectron2/modeling/backbone/vit.py", line 275, in forward
x = self.attn(x)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/src/EVA-master/EVA-02/det/detectron2/modeling/backbone/vit.py", line 125, in forward
x = xops.memory_efficient_attention(q, k, v)
File "/usr/local/lib/python3.8/dist-packages/xformers/ops/memory_efficient_attention.py", line 967, in memory_efficient_attention
return op.forward_no_grad(
File "/usr/local/lib/python3.8/dist-packages/xformers/ops/memory_efficient_attention.py", line 343, in forward_no_grad
return cls.FORWARD_OPERATOR(
File "/usr/local/lib/python3.8/dist-packages/torch/_ops.py", line 143, in call
return self._op(*args, **kwargs or {})
RuntimeError: CUDA error: invalid device function
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
你好 请问你们用的xformer具体版本号是多少 我这边换了好几个xformer,在检测任务上训练没问题 但测试时出现以上error,感觉是这个xformer包的版本问题 谢谢
from eva.
TypeError Traceback (most recent call last)
Cell In[2], line 7
4 text = tokenizer(["a diagram", "a dog", "a cat"]).to(device)
6 with torch.no_grad(), torch.cuda.amp.autocast():
----> 7 image_features = model.encode_image(image)
8 text_features = model.encode_text(text)
9 image_features /= image_features.norm(dim=-1, keepdim=True)
File /data/sswang/NFT_search/EVA/EVA-CLIP/utils/../rei/eva_clip/model.py:302, in CustomCLIP.encode_image(self, image, normalize)
301 def encode_image(self, image, normalize: bool = False):
--> 302 features = self.visual(image)
303 return F.normalize(features, dim=-1) if normalize else features
File ~/anaconda3/envs/rei/lib/python3.8/site-packages/torch/nn/modules/module.py:1130, in Module._call_impl(self, *input, **kwargs)
1126 # If we don't have any hooks, we want to skip the rest of the logic in
1127 # this function, and just call forward.
1128 if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
1129 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1130 return forward_call(*input, **kwargs)
1131 # Do not call functions when jit is used
1132 full_backward_hooks, non_full_backward_hooks = [], []
File /data/sswang/NFT_search/EVA/EVA-CLIP/utils/../rei/eva_clip/eva_vit_model.py:529, in EVAVisionTransformer.forward(self, x, return_all_features)
527 if return_all_features:
...
212 )
213 x = x.reshape(B, N, -1)
214 x = self.inner_attn_ln(x)
TypeError: memory_efficient_attention() got an unexpected keyword argument 'scale'
在执行安装依赖
pip install -r requirements.txt
Xformers从0.0.18一直安装到0.0.13 执行官方给的demo时报错,不知道是不是Xformer的版本问题
from eva.
Hi @coni-coco, we build xformer from source using commit https://github.com/facebookresearch/xformers/tree/7e05e2caaaf8060c1c6baadc2b04db02d5458a94
But we believe using the latest version of pytorch & xformer also works.
I upgrade my dependencies as following:
torch 2.0.1
torchvision 0.15.2
xformers 0.0.20
nvidia-cudnn-cu11 8.5.0.96
……
It works!
from eva.
Hi @ShuxunoO, when you follow these versions:
torch 2.0.1
torchvision 0.15.2
xformers 0.0.20
nvidia-cudnn-cu11 8.5.0.96
the mmcv and mmsegmentation version is?
from eva.
Related Issues (20)
- CUDA out of memory when inference
- whether the training of EVA involves masking text (caption) token? HOT 1
- Robust accuracy on ObjectNet dataset.
- Is there any plan to use lora for finetune eva_clip? HOT 1
- How to use EVA-02 detection models for inference?
- [EVA-CLIP] Are you sure about your way to compute probabilities? HOT 1
- Why are the model weights saved at each epoch the same when using DeepSpeed? HOT 1
- Can EVA-CLIP-8B and EVA-CLIP-18B support quantization? HOT 6
- ```EVA-CLIP-18B``` weight is not available at HuggingFace HOT 2
- Is there any reason why you didn't use the EVA02 architecture for EVA-CLIP models larger than 4B? HOT 1
- different weight decay between code and paper for clip 18b HOT 1
- Any plans for releasing model weights of COCO-Stuff trained segmentation models with EVA-02 backbones
- EVA CLIP 8B GPU out of memory in COLAB PRO Hugging face version HOT 1
- can remove xformers dependency? HOT 1
- Issues about the performance of vanilla EVA-02-S
- Dockerfile error
- How much GPU does EVA-CLIP-8B-plus need?
- Where is EVA G? HOT 3
- Size 14x14 to 16x16 patch interpolation for smaller EVA 2 models HOT 1
- Chinese ability of EVA-CLIP-18B
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 eva.