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","]","."]
docstr: Convert a NumPy depth image or a batch of images to a PIL image.
docstr_tok: ["Convert","a","NumPy","depth","image","or","a","batch","of","images","to","a","PIL","image","."]
code: def numpy_to_depth(self, images):
      """
      Convert a NumPy depth image or a batch of images to a PIL image.
      """
      if images.ndim == 3:
          images = images[None, ...]
      images_depth = images[:, :, :, 3:]
      if images.shape[-1] == 6:
          images_depth = (images_depth * 255).round().astype("uint8")
          pil_images = [
              Image.fromarray(
                  self.rgblike_to_depthmap(image_depth), mode="I;16"
              )
              for image_depth in images_depth
          ]
      elif images.shape[-1] == 4:
          images_depth = (images_depth * 65535.0).astype(np.uint16)
          pil_images = [
              Image.fromarray(image_depth, mode="I;16")
              for image_depth in images_depth
          ]
      else:
          raise Exception("Not supported")
  
      return pil_images
  
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 4 for calling the VaeImageProcessorLDM3D obj's underlying member method code with example usage: obj.numpy_to_depth(images) and returns: pil_images