Skip to content

Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.

fix: remove commented-out code for autocasting in prediction logic of predict_formula.py

myhlolifd79885b236d
diff --git a/mineru/model/mfr/pp_formulanet_plus_m/predict_formula.py b/mineru/model/mfr/pp_formulanet_plus_m/predict_formula.py
index fe21d604..7d15f478 100644
--- a/mineru/model/mfr/pp_formulanet_plus_m/predict_formula.py
+++ b/mineru/model/mfr/pp_formulanet_plus_m/predict_formula.py
@@ -77,6 +77,8 @@ class FormulaRecognizer(BaseOCRV20):
with tqdm(total=len(inp), desc="MFR Predict") as pbar:
for index in range(0, len(inp), batch_size):
batch_data = inp[index: index + batch_size]
+ # with torch.amp.autocast(device_type=self.device.type):
+ # batch_preds = [self.net(batch_data)]
batch_preds = [self.net(batch_data)]
batch_preds = [p.reshape([-1]) for p in batch_preds[0]]
batch_preds = [bp.cpu().numpy() for bp in batch_preds]