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
b398a2d2
Commit
b398a2d2
authored
Jun 17, 2025
by
myhloli
Browse files
fix: update NPU compile mode handling in pipeline_analyze.py
parent
bfaf07c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
mineru/backend/pipeline/pipeline_analyze.py
mineru/backend/pipeline/pipeline_analyze.py
+2
-5
No files found.
mineru/backend/pipeline/pipeline_analyze.py
View file @
b398a2d2
...
...
@@ -2,15 +2,12 @@ import os
import
time
from
typing
import
List
,
Tuple
import
PIL.Image
import
torch
from
loguru
import
logger
from
.model_init
import
MineruPipelineModel
from
mineru.utils.config_reader
import
get_device
from
...utils.pdf_classify
import
classify
from
...utils.pdf_image_tools
import
load_images_from_pdf
from
loguru
import
logger
from
...utils.model_utils
import
get_vram
,
clean_memory
...
...
@@ -166,7 +163,7 @@ def batch_image_analyze(
try
:
import
torch_npu
if
torch_npu
.
npu
.
is_available
():
torch
.
npu
.
set_compile_mode
(
jit_compile
=
False
)
torch
_npu
.
npu
.
set_compile_mode
(
jit_compile
=
False
)
except
Exception
as
e
:
raise
RuntimeError
(
"NPU is selected as device, but torch_npu is not available. "
...
...
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