InternLM / InternLM/InternLM-XComposer
ValueError: Input image size (490*490) doesn't match model (336*336).
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 175
- PR merge metrics
- No merged PRs in 30d
Description
When I ran the example inference code for model xcomposer2-vl-7b provided in the huggingface page:
```
import torch
from transformers import AutoModel, AutoTokenizer
torch.set_grad_enabled(False)
# init model and tokenizer
model = AutoModel.from_pretrained('internlm/internlm-xcomposer2-vl-7b', trust_remote_code=True).cuda().eval()
tokenizer = AutoTokenizer.from_pretrained('internlm/internlm-xcomposer2-vl-7b', trust_remote_code=True)
query = 'Please describe this image in detail.'
image = 'Our image path'
with torch.cuda.amp.autocast():
response, _ = model.chat(tokenizer, query=query, image=image, history=[], do_sample=False)
print(response)
```
I got an error:
`ValueError: Input image size (490*490) doesn't match model (336*336)`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.