mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-10 09:45:49 +08:00
Make the cv2 dependency optional (#27780)
Signed-off-by: Jacob <cmpute@qq.com>
This commit is contained in:
parent
80679f108f
commit
d72299d47b
@ -30,7 +30,6 @@ from io import BytesIO
|
||||
from tempfile import NamedTemporaryFile
|
||||
from typing import Any, cast
|
||||
|
||||
import cv2
|
||||
import numpy as np
|
||||
from PIL import Image
|
||||
from transformers import PreTrainedTokenizerBase
|
||||
@ -850,6 +849,8 @@ class RandomMultiModalDataset(RandomDataset):
|
||||
Creates a video with random pixel values, encodes it to MP4 format,
|
||||
and returns the content as bytes.
|
||||
"""
|
||||
import cv2
|
||||
|
||||
random_pixels = self._rng.integers(
|
||||
0,
|
||||
256,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user