浏览代码

refactor: simplify UnimernetModel constructor by removing unused cfg_path parameter

myhloli 5 月之前
父节点
当前提交
9ded9e6bad
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      mineru/model/mfr/unimernet/Unimernet.py

+ 1 - 1
mineru/model/mfr/unimernet/Unimernet.py

@@ -19,7 +19,7 @@ class MathDataset(Dataset):
 
 
 class UnimernetModel(object):
-    def __init__(self, weight_dir, cfg_path, _device_="cpu"):
+    def __init__(self, weight_dir, _device_="cpu"):
         from .unimernet_hf import UnimernetModel
         if _device_.startswith("mps"):
             self.model = UnimernetModel.from_pretrained(weight_dir, attn_implementation="eager")