Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question during the inference #2

Open
gujiaqivadin opened this issue Aug 15, 2024 · 0 comments
Open

Question during the inference #2

gujiaqivadin opened this issue Aug 15, 2024 · 0 comments

Comments

@gujiaqivadin
Copy link

(vlm) (base) root@workspace-gujiaqi-workspace-gujiaqi-6d24da8c-7c55bd5d67-5rcdd:/mnt/gujiaqi-pvc/mypvc/workspace/llm/tq-chart-vlm# CUDA_VISIBLE_DEVICES=0 python models/chartgemma.py
Loading checkpoint shards: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 1.76it/s]
Traceback (most recent call last):
File "/mnt/gujiaqi-pvc/mypvc/workspace/anaconda3/envs/vlm/lib/python3.10/site-packages/transformers/feature_extraction_utils.py", line 183, in convert_to_tensors
tensor = as_tensor(value)
File "/mnt/gujiaqi-pvc/mypvc/workspace/anaconda3/envs/vlm/lib/python3.10/site-packages/transformers/feature_extraction_utils.py", line 142, in as_tensor
return torch.tensor(value)
RuntimeError: Could not infer dtype of numpy.float32

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/mnt/gujiaqi-pvc/mypvc/workspace/llm/tq-chart-vlm/models/chartgemma.py", line 29, in
inputs = processor(text=input_text, images=image, return_tensors="pt")
File "/mnt/gujiaqi-pvc/mypvc/workspace/anaconda3/envs/vlm/lib/python3.10/site-packages/transformers/models/paligemma/processing_paligemma.py", line 254, in call
pixel_values = self.image_processor(
File "/mnt/gujiaqi-pvc/mypvc/workspace/anaconda3/envs/vlm/lib/python3.10/site-packages/transformers/image_processing_utils.py", line 41, in call
return self.preprocess(images, **kwargs)
File "/mnt/gujiaqi-pvc/mypvc/workspace/anaconda3/envs/vlm/lib/python3.10/site-packages/transformers/utils/generic.py", line 852, in wrapper
return func(*args, **valid_kwargs)
File "/mnt/gujiaqi-pvc/mypvc/workspace/anaconda3/envs/vlm/lib/python3.10/site-packages/transformers/models/siglip/image_processing_siglip.py", line 241, in preprocess
return BatchFeature(data=data, tensor_type=return_tensors)
File "/mnt/gujiaqi-pvc/mypvc/workspace/anaconda3/envs/vlm/lib/python3.10/site-packages/transformers/feature_extraction_utils.py", line 79, in init
self.convert_to_tensors(tensor_type=tensor_type)
File "/mnt/gujiaqi-pvc/mypvc/workspace/anaconda3/envs/vlm/lib/python3.10/site-packages/transformers/feature_extraction_utils.py", line 189, in convert_to_tensors
raise ValueError(
ValueError: Unable to create tensor, you should probably activate padding with 'padding=True' to have batched tensors with the same length.

I got wrong output duriing running the inference demo, can you provide your transformer's verision or other setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant