class_docstr: Image processor for VAE LDM3D.
  
  Args:
      do_resize (`bool`, *optional*, defaults to `True`):
          Whether to downscale the image's (height, width) dimensions to multiples of `vae_scale_factor`.
      vae_scale_factor (`int`, *optional*, defaults to `8`):
          VAE scale factor. If `do_resize` is `True`, the image is automatically resized to multiples of this factor.
      resample (`str`, *optional*, defaults to `lanczos`):
          Resampling filter to use when resizing the image.
      do_normalize (`bool`, *optional*, defaults to `True`):
          Whether to normalize the image to [-1,1].
class_docstr_tok: ["Image","processor","for","VAE","LDM3D",".","Args",":","do_resize","(","`","bool","`",",","*","optional","*",",","defaults","to","`","True","`",")",":","Whether","to","downscale","the","image","'s","(","height",",","width",")","dimensions","to","multiples","of","`","vae_scale_factor","`",".","vae_scale_factor","(","`","int","`",",","*","optional","*",",","defaults","to","`","8","`",")",":","VAE","scale","factor",".","If","`","do_resize","`","is","`","True","`",",","the","image","is","automatically","resized","to","multiples","of","this","factor",".","resample","(","`","str","`",",","*","optional","*",",","defaults","to","`","lanczos","`",")",":","Resampling","filter","to","use","when","resizing","the","image",".","do_normalize","(","`","bool","`",",","*","optional","*",",","defaults","to","`","True","`",")",":","Whether","to","normalize","the","image","to","[","-1,1","]","."]
code: def postprocess(
      self,
      image: torch.FloatTensor,
      output_type: str = "pil",
      do_denormalize: Optional[List[bool]] = None,
  ):
      if not isinstance(image, torch.Tensor):
          raise ValueError(
              f"Input for postprocessing is in incorrect format: {type(image)}. We only support pytorch tensor"
          )
      if output_type not in ["latent", "pt", "np", "pil"]:
          deprecation_message = (
              f"the output_type {output_type} is outdated and has been set to `np`. Please make sure to set it to one of these instead: "
              "`pil`, `np`, `pt`, `latent`"
          )
          deprecate(
              "Unsupported output_type",
              "1.0.0",
              deprecation_message,
              standard_warn=False,
          )
          output_type = "np"
  
      if do_denormalize is None:
          do_denormalize = [self.config.do_normalize] * image.shape[0]
  
      image = torch.stack(
          [
              self.denormalize(image[i])
              if do_denormalize[i]
              else image[i]
              for i in range(image.shape[0])
          ]
      )
  
      image = self.pt_to_numpy(image)
  
      if output_type == "np":
          if image.shape[-1] == 6:
              image_depth = np.stack(
                  [
                      self.rgblike_to_depthmap(im[:, :, 3:])
                      for im in image
                  ],
                  axis=0,
              )
          else:
              image_depth = image[:, :, :, 3:]
          return image[:, :, :, :3], image_depth
  
      if output_type == "pil":
          return self.numpy_to_pil(image), self.numpy_to_depth(image)
      else:
          raise Exception(f"This type {output_type} is not supported")
  
imports: import warnings
  from typing import List, Optional, Union
  import numpy
  import PIL.Image
  import torch
  from PIL import Image
  from .configuration_utils import ConfigMixin, register_to_config
  from .utils import CONFIG_NAME, PIL_INTERPOLATION, deprecate
label_desc: Use image node_id 5 for calling the VaeImageProcessorLDM3D obj's underlying member method code with example usage: obj.postprocess(image, output_type, do_denormalize) and returns: image,  image_depth, self,  self