Files
diffusers/docs/source/en/api/image_processor.md
Sayak Paul 30e5e81d58 change to 2024 in the license (#6902)
change to 2024
2024-02-08 08:19:31 -10:00

1.7 KiB

VAE Image Processor

The [VaeImageProcessor] provides a unified API for [StableDiffusionPipeline]s to prepare image inputs for VAE encoding and post-processing outputs once they're decoded. This includes transformations such as resizing, normalization, and conversion between PIL Image, PyTorch, and NumPy arrays.

All pipelines with [VaeImageProcessor] accept PIL Image, PyTorch tensor, or NumPy arrays as image inputs and return outputs based on the output_type argument by the user. You can pass encoded image latents directly to the pipeline and return latents from the pipeline as a specific output with the output_type argument (for example output_type="latent"). This allows you to take the generated latents from one pipeline and pass it to another pipeline as input without leaving the latent space. It also makes it much easier to use multiple pipelines together by passing PyTorch tensors directly between different pipelines.

VaeImageProcessor

autodoc image_processor.VaeImageProcessor

VaeImageProcessorLDM3D

The [VaeImageProcessorLDM3D] accepts RGB and depth inputs and returns RGB and depth outputs.

autodoc image_processor.VaeImageProcessorLDM3D