open-compass / VLMEvalKit

Open-source evaluation toolkit of large vision-language models (LVLMs), support 160+ VLMs, 50+ benchmarks
https://huggingface.co/spaces/opencompass/open_vlm_leaderboard
Apache License 2.0
1.4k stars 195 forks source link

Error: module 'torch.library' has no attribute 'register_fake' #605

Open tjasmin111 opened 1 week ago

tjasmin111 commented 1 week ago

After I install it, I tried running this demo command. But I get errors:

# Demo
from vlmeval.config import supported_VLM
model = supported_VLM['idefics_9b_instruct']()
# Forward Single Image
ret = model.generate(['assets/apple.jpg', 'What is in this image?'])
print(ret)  # The image features a red apple with a leaf on it.
# Forward Multiple Images
ret = model.generate(['assets/apple.jpg', 'assets/apple.jpg', 'How many apples are there in the provided images? '])
print(ret)  # There are two apples in the provided images.

Error:

RuntimeError: Failed to import transformers.models.auto.processing_auto because of the following error (look up to see its traceback):
module 'torch.library' has no attribute 'register_fake'
kennymckormick commented 1 day ago

Hi, @tjasmin111 , I haven't encounter this problem (I'm using python 3.10 torch 2.4 transformers 4.46.2), would you please provide your detailed environment?

image