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
  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 diffusers.models import AutoencoderKL, UNet2DConditionModel
  from diffusers.pipelines.stable_diffusion import StableDiffusionPipeline, StableDiffusionSafetyChecker
  from diffusers.schedulers import KarrasDiffusionSchedulers
  from diffusers.utils import BaseOutput
label_desc: Use image node_id 1 to create a new CrossFrameAttnProcessor2_0 object  with example: obj = CrossFrameAttnProcessor2_0(batch_size)