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
7cdf7e2f
Unverified
Commit
7cdf7e2f
authored
Jan 09, 2026
by
maang
Committed by
GitHub
Jan 09, 2026
Browse files
[Model] Remove redundant None check in DeepSeekOCR image input processing (#32016)
Signed-off-by:
maang
<
maang_h@163.com
>
parent
bbf80ede
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
13 deletions
+10
-13
vllm/model_executor/models/deepseek_ocr.py
vllm/model_executor/models/deepseek_ocr.py
+10
-13
No files found.
vllm/model_executor/models/deepseek_ocr.py
View file @
7cdf7e2f
...
...
@@ -438,19 +438,16 @@ class DeepseekOCRForCausalLM(nn.Module, SupportsMultiModal, SupportsPP, Supports
if
pixel_values
is
None
or
torch
.
sum
(
pixel_values
).
item
()
==
0
:
return
None
if
pixel_values
is
not
None
:
base_size
=
self
.
vision_config
.
image_size
return
DeepseekOCRImagePixelInputs
(
type
=
"pixel_values"
,
data
=
pixel_values
,
images_crop
=
images_crop
,
images_spatial_crop
=
images_spatial_crop
,
resolve_bindings
=
{
"base_size"
:
base_size
,
},
)
raise
AssertionError
(
"This line should be unreachable."
)
base_size
=
self
.
vision_config
.
image_size
return
DeepseekOCRImagePixelInputs
(
type
=
"pixel_values"
,
data
=
pixel_values
,
images_crop
=
images_crop
,
images_spatial_crop
=
images_spatial_crop
,
resolve_bindings
=
{
"base_size"
:
base_size
,
},
)
def
_encode_global_features
(
self
,
image_tensor
:
torch
.
Tensor
)
->
torch
.
Tensor
:
global_features_1
=
self
.
sam_model
(
image_tensor
)
...
...
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