class_docstr: Inspired by: https://github.com/haofanwang/ControlNet-for-Diffusers/
class_docstr_tok: ["Inspired","by",":","https",":","\/\/github.com\/haofanwang\/ControlNet-for-Diffusers\/"]
code: def _default_height_width(self, height, width, image):
      if isinstance(image, list):
          image = image[0]
  
      if height is None:
          if isinstance(image, PIL.Image.Image):
              height = image.height
          elif isinstance(image, torch.Tensor):
              height = image.shape[3]
  
          height = (
              height // 8
          ) * 8  # round down to nearest multiple of 8
  
      if width is None:
          if isinstance(image, PIL.Image.Image):
              width = image.width
          elif isinstance(image, torch.Tensor):
              width = image.shape[2]
  
          width = (
              width // 8
          ) * 8  # round down to nearest multiple of 8
  
      return height, width
  
imports: import inspect
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import numpy
  import PIL.Image
  import torch
  import torch.nn.functional
  from transformers import CLIPImageProcessor, CLIPTextModel, CLIPTokenizer
  from diffusers import AutoencoderKL, ControlNetModel, DiffusionPipeline, UNet2DConditionModel, logging
  from diffusers.pipelines.stable_diffusion import StableDiffusionPipelineOutput, StableDiffusionSafetyChecker
  from diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion_controlnet import MultiControlNetModel
  from diffusers.schedulers import KarrasDiffusionSchedulers
  from diffusers.utils import PIL_INTERPOLATION, is_accelerate_available, is_accelerate_version, replace_example_docstring
  from diffusers.utils.torch_utils import randn_tensor
label_desc: Use image node_id 16 for calling the StableDiffusionControlNetInpaintPipeline obj's underlying member method code with example usage: obj._default_height_width(height, width, image) and returns: height,  width