Преглед на файлове

Update mineru/model/mfr/pp_formulanet_plus_m/predict_formula.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Xiaomeng Zhao преди 3 седмици
родител
ревизия
e7485c5d79
променени са 1 файла, в които са добавени 1 реда и са изтрити 0 реда
  1. 1 0
      mineru/model/mfr/pp_formulanet_plus_m/predict_formula.py

+ 1 - 0
mineru/model/mfr/pp_formulanet_plus_m/predict_formula.py

@@ -64,6 +64,7 @@ class FormulaRecognizer(BaseOCRV20):
         )
 
     def predict(self, img_list, batch_size: int = 64):
+        # Reduce batch size by 50% to avoid potential memory issues during inference.
         batch_size = int(0.5 * batch_size)
         batch_imgs = self.pre_tfs["UniMERNetImgDecode"](imgs=img_list)
         batch_imgs = self.pre_tfs["UniMERNetTestTransform"](imgs=batch_imgs)