docstr: Gets the batch size of the output given the batch size of the input prompts.
docstr_tok: ["Gets","the","batch","size","of","the","output","given","the","batch","size","of","the","input","prompts","."]
code: def _get_batch_size(
      self,
      points: Optional[tuple[Tensor, Tensor]],
      boxes: Optional[Tensor],
      masks: Optional[Tensor],
  ) -> int:
      """Gets the batch size of the output given the batch size of the input prompts."""
      if points is not None:
          return points[0].shape[0]
      elif boxes is not None:
          return boxes.shape[0]
      elif masks is not None:
          return masks.shape[0]
      else:
          return 1
  
imports: from __future__ import annotations
  from math import pi
  from typing import Optional
  import torch
  from torch import nn
  from kornia.contrib.models.common import LayerNorm2d
  from kornia.core import Device, Module, Tensor, concatenate, cos, sin, stack, zeros
label_desc: Use image node_id 6 for calling the PromptEncoder obj's underlying member method code with example usage: obj._get_batch_size(points, boxes, masks) and returns: points, boxes, masks, int