Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ModalityDance/Omni-R1
/ is_valid_image
Function
is_valid_image
src/transformers/src/transformers/image_utils.py:139–140 ·
view source on GitHub ↗
(img)
Source
from the content-addressed store, hash-verified
137
138
139
def
is_valid_image(img):
140
return
is_pil_image(img) or is_numpy_array(img) or is_torch_tensor(img) or is_tf_tensor(img) or is_jax_tensor(img)
141
142
143
def
valid_images(imgs):
Callers
15
valid_images
Function · 0.85
is_batched
Function · 0.85
make_list_of_images
Function · 0.85
to_numpy_array
Function · 0.85
is_image_or_image_url
Function · 0.85
_extract_images_from_prompts
Method · 0.85
make_list_of_images
Function · 0.85
make_batched
Function · 0.85
make_batched_images
Function · 0.85
make_batched_videos
Function · 0.85
make_batched_videos
Function · 0.85
make_batched_videos
Function · 0.85
Calls
5
is_pil_image
Function · 0.85
is_numpy_array
Function · 0.85
is_torch_tensor
Function · 0.85
is_tf_tensor
Function · 0.85
is_jax_tensor
Function · 0.85
Tested by
no test coverage detected