stanrom commited on
Commit
c46a3ad
1 Parent(s): b0d7156

Update modeling_internlm_xcomposer2.py

Browse files
Files changed (1) hide show
  1. modeling_internlm_xcomposer2.py +2 -1
modeling_internlm_xcomposer2.py CHANGED
@@ -120,7 +120,8 @@ class InternLMXComposer2ForCausalLM(InternLM2PreTrainedModel):
120
 
121
  def img2emb(self, image):
122
  print('self.device = ', self.device)
123
- img_embeds = self.vision_proj(self.vit(image.to(self.device)))
 
124
  atts_img = torch.ones(
125
  img_embeds.size()[:-1], dtype=torch.long).to(img_embeds.device)
126
 
 
120
 
121
  def img2emb(self, image):
122
  print('self.device = ', self.device)
123
+ # img_embeds = self.vision_proj(self.vit(image.to(self.device)))
124
+ img_embeds = self.vision_proj(self.vit(image))
125
  atts_img = torch.ones(
126
  img_embeds.size()[:-1], dtype=torch.long).to(img_embeds.device)
127