Utility and helper functions for working with 🤗 Diffusers.
Convert a numpy image or a batch of images to a PIL image.
Convert a torch image to a PIL image.
( image: Union convert_method: Callable = None ) → PIL.Image.Image
Parameters
str
or PIL.Image.Image
) —
The image to convert to the PIL Image format. None
the image will be converted
“RGB”. Returns
PIL.Image.Image
A PIL Image.
Loads image
to a PIL Image.
( video_frames: Union output_video_path: str = None fps: int = 10 )
Prepares a single grid of images. Useful for visualization purposes.