class_docstr: <Tip warning={true}>
  
  🧪 This is an experimental feature!
  
  </Tip>
  
  Pipeline for image-guided image inpainting using Stable Diffusion.
  
  This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods
  implemented for all pipelines (downloading, saving, running on a particular device, etc.).
  
  Args:
      vae ([`AutoencoderKL`]):
          Variational Auto-Encoder (VAE) model to encode and decode images to and from latent representations.
      image_encoder ([`PaintByExampleImageEncoder`]):
          Encodes the example input image. The `unet` is conditioned on the example image instead of a text prompt.
      tokenizer ([`~transformers.CLIPTokenizer`]):
          A `CLIPTokenizer` to tokenize text.
      unet ([`UNet2DConditionModel`]):
          A `UNet2DConditionModel` to denoise the encoded image latents.
      scheduler ([`SchedulerMixin`]):
          A scheduler to be used in combination with `unet` to denoise the encoded image latents. Can be one of
          [`DDIMScheduler`], [`LMSDiscreteScheduler`], or [`PNDMScheduler`].
      safety_checker ([`StableDiffusionSafetyChecker`]):
          Classification module that estimates whether generated images could be considered offensive or harmful.
          Please refer to the [model card](https://huggingface.co/runwayml/stable-diffusion-v1-5) for more details
          about a model's potential harms.
      feature_extractor ([`~transformers.CLIPImageProcessor`]):
          A `CLIPImageProcessor` to extract features from generated images; used as inputs to the `safety_checker`.
code: def _encode_vae_image(
      self, image: torch.Tensor, generator: torch.Generator
  ):
      if isinstance(generator, list):
          image_latents = [
              retrieve_latents(
                  self.vae.encode(image[i : i + 1]),
                  generator=generator[i],
              )
              for i in range(image.shape[0])
          ]
          image_latents = torch.cat(image_latents, dim=0)
      else:
          image_latents = retrieve_latents(
              self.vae.encode(image), generator=generator
          )
  
      image_latents = self.vae.config.scaling_factor * image_latents
  
      return image_latents
  
imports: import inspect
  from typing import Callable, List, Optional, Union
  import numpy
  import PIL.Image
  import torch
  from transformers import CLIPImageProcessor
  from ...image_processor import VaeImageProcessor
  from ...models import AutoencoderKL, UNet2DConditionModel
  from ...schedulers import DDIMScheduler, LMSDiscreteScheduler, PNDMScheduler
  from ...utils import deprecate, logging
  from ...utils.torch_utils import randn_tensor
  from ..pipeline_utils import DiffusionPipeline
  from ..stable_diffusion import StableDiffusionPipelineOutput
  from ..stable_diffusion.safety_checker import StableDiffusionSafetyChecker
  from .image_encoder import PaintByExampleImageEncoder
label_desc: Use image node_id 8 for calling the PaintByExamplePipeline obj's underlying member method code with example usage: obj._encode_vae_image(image, generator) and returns: image_latents