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!

Open
#723 5 comments 0 reactions 1 assignee View on GitHub

@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) # 提供的图片中有两个苹果`

报的错误是:
image
image

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.