open-compass / open-compass/VLMEvalKit
在测试Internvl-76B的时候,报错RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0!
@PhoenixZ810 is already working on this.
Since Jan 16, 2025.
- Dominant language
- Python
- Stars
- 4.4k
- Forks
- 768
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 17
Description
在测试Internvl-76B的时候,代码如下:
`from vlmeval.config import supported_VLM
model = supported_VLM'InternVL2-76B-sft'
ret = model.generate(['assets/apple.jpg', 'What is in this image?']) #前向单张图片
print(ret) # 这张图片上有一个带叶子的红苹果
ret = model.generate(['assets/apple.jpg', 'assets/apple.jpg', 'How many apples are there in the provided images? ']) # 前向多张图片
print(ret) # 提供的图片中有两个苹果`
报的错误是:
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument mat2 in method wrapper_CUDA_bmm)
请问一下这个如何解决?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.