bingwork commited on
Commit
4bd1add
1 Parent(s): f4b2600

Upload mmalaya_arch.py

Browse files
Files changed (1) hide show
  1. mmalaya_arch.py +1 -0
mmalaya_arch.py CHANGED
@@ -14,6 +14,7 @@ class BLIP2VisionTower(nn.Module):
14
  self.vision_tower = Blip2Model(self.cfg_only)
15
  del self.vision_tower.language_model
16
  del self.vision_tower.language_projection
 
17
  self.image_processor = Blip2Processor.from_pretrained(self.vision_tower_name)
18
 
19
  def feature_select(self, image_forward_outs):
 
14
  self.vision_tower = Blip2Model(self.cfg_only)
15
  del self.vision_tower.language_model
16
  del self.vision_tower.language_projection
17
+ self.vision_tower.to(dtype=torch.float16)
18
  self.image_processor = Blip2Processor.from_pretrained(self.vision_tower_name)
19
 
20
  def feature_select(self, image_forward_outs):