Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion vllm/model_executor/models/nemotron_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
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
Expand Down Expand Up @@ -416,6 +415,8 @@ def _create_transforms(self):
else:
self.target_height = self.target_width = int(self.final_size)

import cv2

self.transform = A.Compose(
[
A.PadIfNeeded(
Expand Down Expand Up @@ -457,6 +458,8 @@ def _resize_with_aspect_ratio(self, image: np.ndarray) -> np.ndarray:
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
)
Expand Down