Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
9e138cb0
Unverified
Commit
9e138cb0
authored
Jan 29, 2026
by
Kiersten Stokes
Committed by
GitHub
Jan 29, 2026
Browse files
[Misc][Build] Lazy load cv2 in nemotron_parse.py (#33189)
Signed-off-by:
kiersten-stokes
<
kierstenstokes@gmail.com
>
parent
f9d03599
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
vllm/model_executor/models/nemotron_parse.py
vllm/model_executor/models/nemotron_parse.py
+4
-1
No files found.
vllm/model_executor/models/nemotron_parse.py
View file @
9e138cb0
...
...
@@ -11,7 +11,6 @@ import math
from
collections.abc
import
Iterable
,
Mapping
,
Sequence
from
typing
import
Annotated
,
Literal
import
cv2
import
numpy
as
np
import
torch
import
torch.nn
as
nn
...
...
@@ -416,6 +415,8 @@ class NemotronParseImageProcessor:
else
:
self
.
target_height
=
self
.
target_width
=
int
(
self
.
final_size
)
import
cv2
self
.
transform
=
A
.
Compose
(
[
A
.
PadIfNeeded
(
...
...
@@ -457,6 +458,8 @@ class NemotronParseImageProcessor:
new_height
=
int
(
new_width
/
aspect_ratio
)
# Use cv2.INTER_LINEAR like the original
import
cv2
return
cv2
.
resize
(
image
,
(
new_width
,
new_height
),
interpolation
=
cv2
.
INTER_LINEAR
)
...
...
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