class_docstr: Pipeline to generate video from an input image using Stable Video Diffusion.
  
  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.).
  
  Args:
      vae ([`AutoencoderKLTemporalDecoder`]):
          Variational Auto-Encoder (VAE) model to encode and decode images to and from latent representations.
      image_encoder ([`~transformers.CLIPVisionModelWithProjection`]):
          Frozen CLIP image-encoder ([laion/CLIP-ViT-H-14-laion2B-s32B-b79K](https://huggingface.co/laion/CLIP-ViT-H-14-laion2B-s32B-b79K)).
      unet ([`UNetSpatioTemporalConditionModel`]):
          A `UNetSpatioTemporalConditionModel` to denoise the encoded image latents.
      scheduler ([`EulerDiscreteScheduler`]):
          A scheduler to be used in combination with `unet` to denoise the encoded image latents.
      feature_extractor ([`~transformers.CLIPImageProcessor`]):
          A `CLIPImageProcessor` to extract features from generated images.
class_docstr_tok: ["Pipeline","to","generate","video","from","an","input","image","using","Stable","Video","Diffusion",".","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.",")",".","Args",":","vae","(","[","`","AutoencoderKLTemporalDecoder","`","]",")",":","Variational","Auto-Encoder","(","VAE",")","model","to","encode","and","decode","images","to","and","from","latent","representations",".","image_encoder","(","[","`","~transformers.CLIPVisionModelWithProjection","`","]",")",":","Frozen","CLIP","image-encoder","(","[","laion\/CLIP-ViT-H-14-laion2B-s32B-b79K","]","(","https",":","\/\/huggingface.co\/laion\/CLIP-ViT-H-14-laion2B-s32B-b79K",")",")",".","unet","(","[","`","UNetSpatioTemporalConditionModel","`","]",")",":","A","`","UNetSpatioTemporalConditionModel","`","to","denoise","the","encoded","image","latents",".","scheduler","(","[","`","EulerDiscreteScheduler","`","]",")",":","A","scheduler","to","be","used","in","combination","with","`","unet","`","to","denoise","the","encoded","image","latents",".","feature_extractor","(","[","`","~transformers.CLIPImageProcessor","`","]",")",":","A","`","CLIPImageProcessor","`","to","extract","features","from","generated","images","."]
code: def _get_add_time_ids(
      self,
      fps,
      motion_bucket_id,
      noise_aug_strength,
      dtype,
      batch_size,
      num_videos_per_prompt,
      do_classifier_free_guidance,
  ):
      add_time_ids = [fps, motion_bucket_id, noise_aug_strength]
  
      passed_add_embed_dim = (
          self.unet.config.addition_time_embed_dim * len(add_time_ids)
      )
      expected_add_embed_dim = (
          self.unet.add_embedding.linear_1.in_features
      )
  
      if expected_add_embed_dim != passed_add_embed_dim:
          raise ValueError(
              f"Model expects an added time embedding vector of length {expected_add_embed_dim}, but a vector of {passed_add_embed_dim} was created. The model has an incorrect config. Please check `unet.config.time_embedding_type` and `text_encoder_2.config.projection_dim`."
          )
  
      add_time_ids = torch.tensor([add_time_ids], dtype=dtype)
      add_time_ids = add_time_ids.repeat(
          batch_size * num_videos_per_prompt, 1
      )
  
      if do_classifier_free_guidance:
          add_time_ids = torch.cat([add_time_ids, add_time_ids])
  
      return add_time_ids
  
imports: import inspect
  from dataclasses import dataclass
  from typing import Callable, Dict, List, Optional, Union
  import numpy
  import PIL.Image
  import torch
  from transformers import CLIPImageProcessor, CLIPVisionModelWithProjection
  from ...image_processor import VaeImageProcessor
  from ...models import AutoencoderKLTemporalDecoder, UNetSpatioTemporalConditionModel
  from ...schedulers import EulerDiscreteScheduler
  from ...utils import BaseOutput, logging
  from ...utils.torch_utils import is_compiled_module, randn_tensor
  from ..pipeline_utils import DiffusionPipeline
label_desc: Use image node_id 4 for calling the StableVideoDiffusionPipeline obj's underlying member method code with example usage: obj._get_add_time_ids(fps, motion_bucket_id, noise_aug_strength, dtype, batch_size, num_videos_per_prompt, do_classifier_free_guidance) and returns: add_time_ids