Spaces:
Runtime error
Runtime error
Commit
Β·
19f67eb
1
Parent(s):
3af054e
Update minigpt4/models/mini_gpt4.py
Browse files
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 |
)
|