class_docstr: Pipeline for text-to-audio generation using AudioLDM.
  
  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 ([`AutoencoderKL`]):
          Variational Auto-Encoder (VAE) model to encode and decode images to and from latent representations.
      text_encoder ([`~transformers.ClapTextModelWithProjection`]):
          Frozen text-encoder (`ClapTextModelWithProjection`, specifically the
          [laion/clap-htsat-unfused](https://huggingface.co/laion/clap-htsat-unfused) variant.
      tokenizer ([`PreTrainedTokenizer`]):
          A [`~transformers.RobertaTokenizer`] to tokenize text.
      unet ([`UNet2DConditionModel`]):
          A `UNet2DConditionModel` to denoise the encoded audio latents.
      scheduler ([`SchedulerMixin`]):
          A scheduler to be used in combination with `unet` to denoise the encoded audio latents. Can be one of
          [`DDIMScheduler`], [`LMSDiscreteScheduler`], or [`PNDMScheduler`].
      vocoder ([`~transformers.SpeechT5HifiGan`]):
          Vocoder of class `SpeechT5HifiGan`.
code: def prepare_latents(
      self,
      batch_size,
      num_channels_latents,
      height,
      dtype,
      device,
      generator,
      latents=None,
  ):
      shape = (
          batch_size,
          num_channels_latents,
          height // self.vae_scale_factor,
          self.vocoder.config.model_in_dim // self.vae_scale_factor,
      )
      if isinstance(generator, list) and len(generator) != batch_size:
          raise ValueError(
              f"You have passed a list of generators of length {len(generator)}, but requested an effective batch"
              f" size of {batch_size}. Make sure the batch size matches the length of the generators."
          )
  
      if latents is None:
          latents = randn_tensor(
              shape, generator=generator, device=device, dtype=dtype
          )
      else:
          latents = latents.to(device)
  
      # scale the initial noise by the standard deviation required by the scheduler
      latents = latents * self.scheduler.init_noise_sigma
      return latents
  
imports: import inspect
  from typing import Any, Callable, Dict, List, Optional, Union
  import numpy
  import torch
  import torch.nn.functional
  from transformers import ClapTextModelWithProjection, RobertaTokenizer, RobertaTokenizerFast, SpeechT5HifiGan
  from ...models import AutoencoderKL, UNet2DConditionModel
  from ...schedulers import KarrasDiffusionSchedulers
  from ...utils import logging, replace_example_docstring
  from ...utils.torch_utils import randn_tensor
  from ..pipeline_utils import AudioPipelineOutput, DiffusionPipeline
label_desc: Use image node_id 9 for calling the AudioLDMPipeline obj's underlying member method code with example usage: obj.prepare_latents(batch_size, num_channels_latents, height, dtype, device, generator, latents) and returns: latents