Upload mmalaya_arch.py
Browse files- mmalaya_arch.py +2 -2
mmalaya_arch.py
CHANGED
|
@@ -306,8 +306,8 @@ class MMAlayaMetaForCausalLM(ABC):
|
|
| 306 |
torch.tensor(input_ids, dtype=torch.long).unsqueeze(0),
|
| 307 |
)
|
| 308 |
# 加载图像
|
| 309 |
-
|
| 310 |
-
|
| 311 |
|
| 312 |
if return_tensors is not None:
|
| 313 |
if return_tensors == 'pt':
|
|
|
|
| 306 |
torch.tensor(input_ids, dtype=torch.long).unsqueeze(0),
|
| 307 |
)
|
| 308 |
# 加载图像
|
| 309 |
+
image_tensor = self.get_vision_tower().image_processor(
|
| 310 |
+
image, return_tensors='pt')['pixel_values'].half()
|
| 311 |
|
| 312 |
if return_tensors is not None:
|
| 313 |
if return_tensors == 'pt':
|