code: def downscale_height_and_width(height, width, scale_factor=8):
      new_height = height // scale_factor**2
      if height % scale_factor**2 != 0:
          new_height += 1
      new_width = width // scale_factor**2
      if width % scale_factor**2 != 0:
          new_width += 1
      return new_height * scale_factor, new_width * scale_factor
  
file_path: diffusers/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_controlnet.py
imports: from typing import Callable, List, Optional, Union
  import torch
  from ...models import UNet2DConditionModel, VQModel
  from ...schedulers import DDPMScheduler
  from ...utils import logging
  from ...utils.torch_utils import randn_tensor
  from ..pipeline_utils import DiffusionPipeline, ImagePipelineOutput
label_desc: Use image node_id 1 for calling a global function with example usage: downscale_height_and_width(height, width, scale_factor) and returns: unknown,  unknown