Optimize nemotron VL image/video preprocessing#40283
Merged
tomeras91 merged 2 commits intoApr 19, 2026
Merged
Conversation
Signed-off-by: milesial <milesial@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request optimizes the nano_nemotron_vl processor by introducing a compiled _bicubic_resize_and_normalize function that fuses resizing, normalization, and dtype casting. It also adds _pil_to_nhwc_tensor for efficient image conversion and refactors get_video_repl to use batch tokenization for frame separators. Preprocessing logic for both images and videos has been updated to reduce unnecessary tensor concatenations and support broader configuration of normalization parameters. I have no feedback to provide.
tomeras91
approved these changes
Apr 19, 2026
Member
tomeras91
left a comment
There was a problem hiding this comment.
Thanks for the optimizations!
bnellnm
pushed a commit
to neuralmagic/vllm
that referenced
this pull request
Apr 20, 2026
Signed-off-by: milesial <milesial@users.noreply.github.com> Co-authored-by: milesial <milesial@users.noreply.github.com>
baonudesifeizhai
pushed a commit
to baonudesifeizhai/vllm
that referenced
this pull request
Apr 23, 2026
Signed-off-by: milesial <milesial@users.noreply.github.com> Co-authored-by: milesial <milesial@users.noreply.github.com>
avinashsingh77
pushed a commit
to avinashsingh77/vllm
that referenced
this pull request
Apr 27, 2026
Signed-off-by: milesial <milesial@users.noreply.github.com> Co-authored-by: milesial <milesial@users.noreply.github.com> Signed-off-by: Avinash Singh <avinashsingh.rcoem@gmail.com>
Lafunamor
pushed a commit
to Lafunamor/vllm
that referenced
this pull request
May 1, 2026
Signed-off-by: milesial <milesial@users.noreply.github.com> Co-authored-by: milesial <milesial@users.noreply.github.com> Signed-off-by: Adrian <info@zzit.ch>
mystous
pushed a commit
to mystous/vllm_hybrid
that referenced
this pull request
May 10, 2026
Signed-off-by: milesial <milesial@users.noreply.github.com> Co-authored-by: milesial <milesial@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Compile and reorganize image/video preprocessing for nemotron nano VL, reducing the amount of CPU time and memory needed.
@netanel-haber:
LGTM. I ran evals. VoxPopuli (audio+text), InfoVQA_VAL (image+text) and DailyOmni (video+audio+text) are on par before and after.
Originally @milesial's pr: #40093 - I moved it to my fork to just fix DCO and push it through, since he is currently AFK. Otherwise, there are no changes.