Closed hjklearn closed 3 weeks ago
hello! I also have the same problem, have you solved it?
It may be that your cuda version is too old, my cuda version 11.1 also had this error, replaced by 11.8 to solve the problem
It may be that your cuda version is too old, my cuda version 11.1 also had this error, replaced by 11.8 to solve the problem
That might be the reason. My CUDA version is 11.8.
When I run 'Model Usage (Image Embeddings) ':
import torch from PIL import Image from transformers import AutoModel, CLIPImageProcessor model = AutoModel.from_pretrained( 'OpenGVLab/InternViT-300M-448px', torch_dtype=torch.bfloat16, low_cpu_mem_usage=True, trust_remote_code=True).cuda().eval() image = Image.open('./examples/image1.jpg').convert('RGB') image_processor = CLIPImageProcessor.from_pretrained('OpenGVLab/InternViT-300M-448px') pixel_values = image_processor(images=image, return_tensors='pt').pixel_values pixel_values = pixel_values.to(torch.bfloat16).cuda() outputs = model(pixel_values)
it generates the following error: Floating point exception (core dumped)