qnguyen3 commited on
Commit
779d4c7
1 Parent(s): daedff0

Update modeling_llava_qwen2.py

Browse files
Files changed (1) hide show
  1. modeling_llava_qwen2.py +2 -2
modeling_llava_qwen2.py CHANGED
@@ -662,8 +662,8 @@ class LlavaMetaForCausalLM(ABC):
662
  return self.get_model().get_vision_tower()
663
 
664
  def encode_images(self, images):
665
- image_features = self.get_model().get_vision_tower().to(device="cuda:0")(images)
666
- image_features = self.get_model().mm_projector.to(device="cuda:0", dtype=torch.float)(image_features)
667
  return image_features
668
 
669
  def prepare_inputs_labels_for_multimodal(
 
662
  return self.get_model().get_vision_tower()
663
 
664
  def encode_images(self, images):
665
+ image_features = self.get_model().get_vision_tower().(images)
666
+ image_features = self.get_model().mm_projector.(image_features)
667
  return image_features
668
 
669
  def prepare_inputs_labels_for_multimodal(