OpenGVLab / OpenGVLab/InternVideo
some error about internvideo 2.5 demo.py
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.4k
- Forks
- 160
- PR merge metrics
- No merged PRs in 30d
Description
1.In Huggingface or modelscope the newest demo.py forget to set IMAGENET_MEAN and IMAGENET_STD
2.After fixing this issue run demo.py, error is : Input type(c10:BFloat16) and bias type(c10:Half)should be the same.
for error 1:
set them will work
IMAGENET_MEAN = (0.485, 0.456, 0.406)
IMAGENET_STD = (0.229, 0.224, 0.225)
for error 2:
pixel_values = pixel_values.to(torch.bfloat16).to(model.device) change to pixel_values = pixel_values.to(torch.float16).to(model.device) can work.
But if I want to use bfloat16 to inference, how can I solve this problem?
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.
Research direction
Start with the newest demo.py referenced for the Hugging Face or ModelScope demo and reproduce both reported errors. Check the image-normalization constants and the pixel_values dtype conversion, then verify that inference completes with bfloat16 without a dtype mismatch; no specific test file is mentioned.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- huggingface, python, pytorch
- Domain
- computer-vision, machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100