MCPcopy Create free account
hub / github.com/Chen-Yang-Liu/Text2Earth / is_valid_image

Function is_valid_image

src/diffusers/image_processor.py:41–42  ·  view source on GitHub ↗
(image)

Source from the content-addressed store, hash-verified

39
40
41def is_valid_image(image):
42 return isinstance(image, PIL.Image.Image) or isinstance(image, (np.ndarray, torch.Tensor)) and image.ndim in (2, 3)
43
44
45def is_valid_image_imagelist(images):

Callers 2

preprocess_videoMethod · 0.85
is_valid_image_imagelistFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected