InternVideo
InternVideo copied to clipboard
some error about internvideo 2.5 demo.py
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?