class_docstr: Cross frame attention processor with scaled_dot_product attention of Pytorch 2.0.
  
  Args:
      batch_size: The number that represents actual batch size, other than the frames.
          For example, calling unet with a single prompt and num_images_per_prompt=1, batch_size should be equal to
          2, due to classifier-free guidance.
class_docstr_tok: ["Cross","frame","attention","processor","with","scaled_dot_product","attention","of","Pytorch","2.0",".","Args",":","batch_size",":","The","number","that","represents","actual","batch","size",",","other","than","the","frames",".","For","example",",","calling","unet","with","a","single","prompt","and","num_images_per_prompt=1",",","batch_size","should","be","equal","to","2",",","due","to","classifier-free","guidance","."]
code: def __init__(self, batch_size=2):
      if not hasattr(F, "scaled_dot_product_attention"):
          raise ImportError(
              "AttnProcessor2_0 requires PyTorch 2.0, to use it, please upgrade PyTorch to 2.0."
          )
      self.batch_size = batch_size
  
imports: import copy
  import inspect
  from dataclasses import dataclass
  from typing import Callable, List, Optional, Union
  import numpy
  import PIL.Image
  import torch
  import torch.nn.functional
  from torch.nn.functional import grid_sample
  from transformers import CLIPImageProcessor, CLIPTextModel, CLIPTokenizer
  from ...image_processor import VaeImageProcessor
  from ...loaders import LoraLoaderMixin, TextualInversionLoaderMixin
  from ...models import AutoencoderKL, UNet2DConditionModel
  from ...models.lora import adjust_lora_scale_text_encoder
  from ...schedulers import KarrasDiffusionSchedulers
  from ...utils import USE_PEFT_BACKEND, BaseOutput, logging, scale_lora_layers, unscale_lora_layers
  from ...utils.torch_utils import randn_tensor
  from ..pipeline_utils import DiffusionPipeline
  from ..stable_diffusion import StableDiffusionSafetyChecker
label_desc: Use image node_id 1 to create a new CrossFrameAttnProcessor2_0 object  with example: obj = CrossFrameAttnProcessor2_0(batch_size)