Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
MinerU
Commits
38637a6a
Commit
38637a6a
authored
Jun 26, 2025
by
myhloli
Browse files
feat: allow additional keyword arguments in model loading function
parent
3ac969ce
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
mineru/backend/vlm/vlm_analyze.py
mineru/backend/vlm/vlm_analyze.py
+2
-0
No files found.
mineru/backend/vlm/vlm_analyze.py
View file @
38637a6a
...
@@ -25,6 +25,7 @@ class ModelSingleton:
...
@@ -25,6 +25,7 @@ class ModelSingleton:
backend
:
str
,
backend
:
str
,
model_path
:
str
|
None
,
model_path
:
str
|
None
,
server_url
:
str
|
None
,
server_url
:
str
|
None
,
**
kwargs
,
)
->
BasePredictor
:
)
->
BasePredictor
:
key
=
(
backend
,
model_path
,
server_url
)
key
=
(
backend
,
model_path
,
server_url
)
if
key
not
in
self
.
_models
:
if
key
not
in
self
.
_models
:
...
@@ -34,6 +35,7 @@ class ModelSingleton:
...
@@ -34,6 +35,7 @@ class ModelSingleton:
backend
=
backend
,
backend
=
backend
,
model_path
=
model_path
,
model_path
=
model_path
,
server_url
=
server_url
,
server_url
=
server_url
,
**
kwargs
,
)
)
return
self
.
_models
[
key
]
return
self
.
_models
[
key
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment