Vision-CAIR commited on
Commit
19f67eb
β€’
1 Parent(s): 3af054e

Update minigpt4/models/mini_gpt4.py

Browse files
Files changed (1) hide show
  1. minigpt4/models/mini_gpt4.py +1 -1
minigpt4/models/mini_gpt4.py CHANGED
@@ -129,7 +129,7 @@ class MiniGPT4(Blip2Base):
129
  self.vit_to_cpu()
130
  image = image.to("cpu")
131
  with self.maybe_autocast():
132
- image_embeds = self.ln_vision(self.visual_encoder(image))
133
  image_atts = torch.ones(image_embeds.size()[:-1], dtype=torch.long).to(
134
  image.device
135
  )
 
129
  self.vit_to_cpu()
130
  image = image.to("cpu")
131
  with self.maybe_autocast():
132
+ image_embeds = self.ln_vision(self.visual_encoder(image)).to(device)
133
  image_atts = torch.ones(image_embeds.size()[:-1], dtype=torch.long).to(
134
  image.device
135
  )