class_docstr: Pipeline for text-to-image generation using a latent consistency model.
  
  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.FromSingleFileMixin.from_single_file`] for loading `.ckpt` files
      - [`~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 ([`~transformers.CLIPTextModel`]):
          Frozen text-encoder ([clip-vit-large-patch14](https://huggingface.co/openai/clip-vit-large-patch14)).
      tokenizer ([`~transformers.CLIPTokenizer`]):
          A `CLIPTokenizer` to tokenize text.
      unet ([`UNet2DConditionModel`]):
          A `UNet2DConditionModel` to denoise the encoded image latents.
      scheduler ([`SchedulerMixin`]):
          A scheduler to be used in combination with `unet` to denoise the encoded image latents. Currently only
          supports [`LCMScheduler`].
      safety_checker ([`StableDiffusionSafetyChecker`]):
          Classification module that estimates whether generated images could be considered offensive or harmful.
          Please refer to the [model card](https://huggingface.co/runwayml/stable-diffusion-v1-5) for more details
          about a model's potential harms.
      feature_extractor ([`~transformers.CLIPImageProcessor`]):
          A `CLIPImageProcessor` to extract features from generated images; used as inputs to the `safety_checker`.
      requires_safety_checker (`bool`, *optional*, defaults to `True`):
          Whether the pipeline requires a safety checker component.
docstr: See https://github.com/google-research/vdm/blob/dc27b98a554f65cdc654b800da5aa1846545d41b/model_vdm.py#L298
  
  Args:
      timesteps (`torch.Tensor`):
          generate embedding vectors at these timesteps
      embedding_dim (`int`, *optional*, defaults to 512):
          dimension of the embeddings to generate
      dtype:
          data type of the generated embeddings
  
  Returns:
      `torch.FloatTensor`: Embedding vectors with shape `(len(timesteps), embedding_dim)`
code: def get_guidance_scale_embedding(
      self, w, embedding_dim=512, dtype=torch.float32
  ):
      """
      See https://github.com/google-research/vdm/blob/dc27b98a554f65cdc654b800da5aa1846545d41b/model_vdm.py#L298
  
      Args:
          timesteps (`torch.Tensor`):
              generate embedding vectors at these timesteps
          embedding_dim (`int`, *optional*, defaults to 512):
              dimension of the embeddings to generate
          dtype:
              data type of the generated embeddings
  
      Returns:
          `torch.FloatTensor`: Embedding vectors with shape `(len(timesteps), embedding_dim)`
      """
      assert len(w.shape) == 1
      w = w * 1000.0
  
      half_dim = embedding_dim // 2
      emb = torch.log(torch.tensor(10000.0)) / (half_dim - 1)
      emb = torch.exp(torch.arange(half_dim, dtype=dtype) * -emb)
      emb = w.to(dtype)[:, None] * emb[None, :]
      emb = torch.cat([torch.sin(emb), torch.cos(emb)], dim=1)
      if embedding_dim % 2 == 1:  # zero pad
          emb = torch.nn.functional.pad(emb, (0, 1))
      assert emb.shape == (w.shape[0], embedding_dim)
      return emb
  
imports: import inspect
  from typing import Any, Callable, Dict, List, Optional, Union
  import torch
  from transformers import CLIPImageProcessor, CLIPTextModel, CLIPTokenizer, CLIPVisionModelWithProjection
  from ...image_processor import PipelineImageInput, VaeImageProcessor
  from ...loaders import FromSingleFileMixin, IPAdapterMixin, LoraLoaderMixin, TextualInversionLoaderMixin
  from ...models import AutoencoderKL, ImageProjection, UNet2DConditionModel
  from ...models.lora import adjust_lora_scale_text_encoder
  from ...schedulers import LCMScheduler
  from ...utils import USE_PEFT_BACKEND, deprecate, logging, replace_example_docstring, scale_lora_layers, unscale_lora_layers
  from ...utils.torch_utils import randn_tensor
  from ..pipeline_utils import DiffusionPipeline
  from ..stable_diffusion import StableDiffusionPipelineOutput, StableDiffusionSafetyChecker
label_desc: Use image node_id 12 for calling the LatentConsistencyModelPipeline obj's underlying member method code with example usage: obj.get_guidance_scale_embedding(w, embedding_dim, dtype) and returns: emb