From 1fe0fd12d33afb345c8e81410f2ebf60462974b6 Mon Sep 17 00:00:00 2001 From: Cyrus Leung Date: Wed, 19 Mar 2025 18:42:31 +0800 Subject: [PATCH] [Misc] Avoid unnecessary HF `do_rescale` warning when passing dummy data (#15107) Signed-off-by: DarkLight1337 --- vllm/multimodal/profiling.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vllm/multimodal/profiling.py b/vllm/multimodal/profiling.py index 62b75afe8de1b..7b4fb5eb598d1 100644 --- a/vllm/multimodal/profiling.py +++ b/vllm/multimodal/profiling.py @@ -73,7 +73,7 @@ class BaseDummyInputsBuilder(ABC, Generic[_I]): height: int, num_images: int, ) -> list[Image.Image]: - image = Image.new("RGB", (width, height), color=0) + image = Image.new("RGB", (width, height), color=255) return [image] * num_images def _get_dummy_videos( @@ -84,7 +84,7 @@ class BaseDummyInputsBuilder(ABC, Generic[_I]): num_frames: int, num_videos: int, ) -> list[npt.NDArray]: - video = np.zeros((num_frames, width, height, 3)) + video = np.full((num_frames, width, height, 3), 255) return [video] * num_videos