Update modeling_internlm_xcomposer2.py
Browse files
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 |
|