class_docstr: Pipeline for text-to-video generation.
  
  This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods
  implemented for all pipelines (downloading, saving, running on a particular device, etc.).
  
  The pipeline also inherits the following loading methods:
      - [`~loaders.TextualInversionLoaderMixin.load_textual_inversion`] for loading textual inversion embeddings
      - [`~loaders.LoraLoaderMixin.load_lora_weights`] for loading LoRA weights
      - [`~loaders.LoraLoaderMixin.save_lora_weights`] for saving LoRA weights
      - [`~loaders.IPAdapterMixin.load_ip_adapter`] for loading IP Adapters
  
  Args:
      vae ([`AutoencoderKL`]):
          Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.
      text_encoder ([`CLIPTextModel`]):
          Frozen text-encoder ([clip-vit-large-patch14](https://huggingface.co/openai/clip-vit-large-patch14)).
      tokenizer (`CLIPTokenizer`):
          A [`~transformers.CLIPTokenizer`] to tokenize text.
      unet ([`UNet2DConditionModel`]):
          A [`UNet2DConditionModel`] used to create a UNetMotionModel to denoise the encoded video latents.
      motion_adapter ([`MotionAdapter`]):
          A [`MotionAdapter`] to be used in combination with `unet` to denoise the encoded video latents.
      scheduler ([`SchedulerMixin`]):
          A scheduler to be used in combination with `unet` to denoise the encoded image latents. Can be one of
          [`DDIMScheduler`], [`LMSDiscreteScheduler`], or [`PNDMScheduler`].
code: def __init__(
      self,
      vae: AutoencoderKL,
      text_encoder: CLIPTextModel,
      tokenizer: CLIPTokenizer,
      unet: UNet2DConditionModel,
      motion_adapter: MotionAdapter,
      scheduler: Union[
          DDIMScheduler,
          PNDMScheduler,
          LMSDiscreteScheduler,
          EulerDiscreteScheduler,
          EulerAncestralDiscreteScheduler,
          DPMSolverMultistepScheduler,
      ],
      feature_extractor: CLIPImageProcessor = None,
      image_encoder: CLIPVisionModelWithProjection = None,
  ):
      super().__init__()
      unet = UNetMotionModel.from_unet2d(unet, motion_adapter)
  
      self.register_modules(
          vae=vae,
          text_encoder=text_encoder,
          tokenizer=tokenizer,
          unet=unet,
          motion_adapter=motion_adapter,
          scheduler=scheduler,
          feature_extractor=feature_extractor,
          image_encoder=image_encoder,
      )
      self.vae_scale_factor = 2 ** (
          len(self.vae.config.block_out_channels) - 1
      )
      self.image_processor = VaeImageProcessor(
          vae_scale_factor=self.vae_scale_factor
      )
  
imports: import inspect
  from dataclasses import dataclass
  from typing import Any, Callable, Dict, List, Optional, Union
  import numpy
  import torch
  from transformers import CLIPImageProcessor, CLIPTextModel, CLIPTokenizer, CLIPVisionModelWithProjection
  from ...image_processor import PipelineImageInput, VaeImageProcessor
  from ...loaders import IPAdapterMixin, LoraLoaderMixin, TextualInversionLoaderMixin
  from ...models import AutoencoderKL, ImageProjection, UNet2DConditionModel, UNetMotionModel
  from ...models.lora import adjust_lora_scale_text_encoder
  from ...models.unet_motion_model import MotionAdapter
  from ...schedulers import DDIMScheduler, DPMSolverMultistepScheduler, EulerAncestralDiscreteScheduler, EulerDiscreteScheduler, LMSDiscreteScheduler, PNDMScheduler
  from ...utils import USE_PEFT_BACKEND, BaseOutput, logging, replace_example_docstring, scale_lora_layers, unscale_lora_layers
  from ...utils.torch_utils import randn_tensor
  from ..pipeline_utils import DiffusionPipeline
label_desc: Use image node_id 1 to create a new AnimateDiffPipeline object from inherited base classes: DiffusionPipeline, TextualInversionLoaderMixin, IPAdapterMixin, LoraLoaderMixin with example: obj = AnimateDiffPipeline(vae, text_encoder, tokenizer, unet, motion_adapter, scheduler, feature_extractor, image_encoder)