Fix: don't cast input ids to long
Browse files- modeling_deepseekocr2.py +1 -1
modeling_deepseekocr2.py
CHANGED
|
@@ -915,7 +915,7 @@ class DeepseekOCR2ForCausalLM(DeepseekV2ForCausalLM):
|
|
| 915 |
|
| 916 |
with torch.no_grad():
|
| 917 |
output_ids = self.generate(
|
| 918 |
-
input_ids.unsqueeze(0).to(device=device
|
| 919 |
images=[(images_crop.to(device=device, dtype=dtype),
|
| 920 |
images_ori.to(device=device, dtype=dtype))],
|
| 921 |
images_seq_mask=images_seq_mask.unsqueeze(0).to(device=device, dtype=dtype),
|
|
|
|
| 915 |
|
| 916 |
with torch.no_grad():
|
| 917 |
output_ids = self.generate(
|
| 918 |
+
input_ids.unsqueeze(0).to(device=device),
|
| 919 |
images=[(images_crop.to(device=device, dtype=dtype),
|
| 920 |
images_ori.to(device=device, dtype=dtype))],
|
| 921 |
images_seq_mask=images_seq_mask.unsqueeze(0).to(device=device, dtype=dtype),
|