Spaces:
Runtime error
Runtime error
Vision-CAIR
commited on
Commit
β’
10e8d70
1
Parent(s):
6869e3d
Update minigpt4/models/mini_gpt4.py
Browse files
minigpt4/models/mini_gpt4.py
CHANGED
@@ -130,9 +130,7 @@ class MiniGPT4(Blip2Base):
|
|
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 |
-
)
|
136 |
|
137 |
query_tokens = self.query_tokens.expand(image_embeds.shape[0], -1, -1)
|
138 |
query_output = self.Qformer.bert(
|
|
|
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(device)
|
|
|
|
|
134 |
|
135 |
query_tokens = self.query_tokens.expand(image_embeds.shape[0], -1, -1)
|
136 |
query_output = self.Qformer.bert(
|