lym0302 commited on
Commit
4c6ac06
·
1 Parent(s): ed5ae8a

frames_features = frames_features.to(dtype=torch.float16)

Browse files
third_party/VideoLLaMA2/videollama2/model/videollama2_arch.py CHANGED
@@ -197,6 +197,7 @@ class Videollama2MetaForCausalLM(ABC):
197
  video_features = self.get_model().mm_projector(frames_features)
198
  # *********** time ************
199
  elif "tc_connector" in self.config.mm_projector_type or "tp_connector" in self.config.mm_projector_type:
 
200
  video_features = self.get_model().mm_projector(frames_features)
201
  else:
202
  raise Exception(f"Unsupported projector type {self.config.mm_projector_type}!!!")
 
197
  video_features = self.get_model().mm_projector(frames_features)
198
  # *********** time ************
199
  elif "tc_connector" in self.config.mm_projector_type or "tp_connector" in self.config.mm_projector_type:
200
+ frames_features = frames_features.to(dtype=torch.float16)
201
  video_features = self.get_model().mm_projector(frames_features)
202
  else:
203
  raise Exception(f"Unsupported projector type {self.config.mm_projector_type}!!!")