@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / d72299d47b
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 13, 17:00 UTC

Make the cv2 dependency optional (#27780)

Signed-off-by: Jacob <cmpute@qq.com>

Jacob Zhong committed Nov 6, 2025 at 13:08 UTC d72299d47ba64e38f6876f3d5fc69ea70d13d718
1 file changed +2 -1
vllm/benchmarks/datasets.py
+2 -1
@@ -30,7 +30,6 @@ from io import BytesIO
30 from tempfile import NamedTemporaryFile
31 from typing import Any, cast
32
33 -import cv2
33 import numpy as np
34 from PIL import Image
35 from transformers import PreTrainedTokenizerBase
@@ -850,6 +849,8 @@ class RandomMultiModalDataset(RandomDataset):
849 Creates a video with random pixel values, encodes it to MP4 format,
850 and returns the content as bytes.
851 """
852 + import cv2
853 +
854 random_pixels = self._rng.integers(
855 0,
856 256,