Unverified Commit 1fe0fd12 authored by Cyrus Leung's avatar Cyrus Leung Committed by GitHub
Browse files

[Misc] Avoid unnecessary HF `do_rescale` warning when passing dummy data (#15107)


Signed-off-by: default avatarDarkLight1337 <tlleungac@connect.ust.hk>
parent dafb4e50
...@@ -73,7 +73,7 @@ class BaseDummyInputsBuilder(ABC, Generic[_I]): ...@@ -73,7 +73,7 @@ class BaseDummyInputsBuilder(ABC, Generic[_I]):
height: int, height: int,
num_images: int, num_images: int,
) -> list[Image.Image]: ) -> list[Image.Image]:
image = Image.new("RGB", (width, height), color=0) image = Image.new("RGB", (width, height), color=255)
return [image] * num_images return [image] * num_images
def _get_dummy_videos( def _get_dummy_videos(
...@@ -84,7 +84,7 @@ class BaseDummyInputsBuilder(ABC, Generic[_I]): ...@@ -84,7 +84,7 @@ class BaseDummyInputsBuilder(ABC, Generic[_I]):
num_frames: int, num_frames: int,
num_videos: int, num_videos: int,
) -> list[npt.NDArray]: ) -> list[npt.NDArray]:
video = np.zeros((num_frames, width, height, 3)) video = np.full((num_frames, width, height, 3), 255)
return [video] * num_videos return [video] * num_videos
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment