ynhe commited on
Commit
6dd8f38
·
verified ·
1 Parent(s): e0fa7fc

Update demo.py

Browse files
Files changed (1) hide show
  1. demo.py +3 -1
demo.py CHANGED
@@ -10,8 +10,10 @@ from transformers import AutoModel, AutoTokenizer
10
  model_path = 'OpenGVLab/InternVideo2_5_Chat_8B'
11
 
12
  tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
13
- model = AutoModel.from_pretrained(model_path, trust_remote_code=True).half().cuda()
14
 
 
 
15
 
16
  def build_transform(input_size):
17
  MEAN, STD = IMAGENET_MEAN, IMAGENET_STD
 
10
  model_path = 'OpenGVLab/InternVideo2_5_Chat_8B'
11
 
12
  tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
13
+ model = AutoModel.from_pretrained(model_path, trust_remote_code=True).half().cuda().to(torch.bfloat16)
14
 
15
+ IMAGENET_MEAN = (0.485, 0.456, 0.406)
16
+ IMAGENET_STD = (0.229, 0.224, 0.225)
17
 
18
  def build_transform(input_size):
19
  MEAN, STD = IMAGENET_MEAN, IMAGENET_STD