bingwork commited on
Commit
60f50de
1 Parent(s): a2561ec

Upload mmalaya_arch.py

Browse files
Files changed (1) hide show
  1. mmalaya_arch.py +2 -2
mmalaya_arch.py CHANGED
@@ -306,8 +306,8 @@ class MMAlayaMetaForCausalLM(ABC):
306
  torch.tensor(input_ids, dtype=torch.long).unsqueeze(0),
307
  )
308
  # 加载图像
309
- image_processor = model.get_vision_tower().image_processor
310
- image_tensor = image_processor(image, return_tensors='pt')['pixel_values'].half()
311
 
312
  if return_tensors is not None:
313
  if return_tensors == 'pt':
 
306
  torch.tensor(input_ids, dtype=torch.long).unsqueeze(0),
307
  )
308
  # 加载图像
309
+ image_tensor = self.get_vision_tower().image_processor(
310
+ image, return_tensors='pt')['pixel_values'].half()
311
 
312
  if return_tensors is not None:
313
  if return_tensors == 'pt':