class_docstr: Pipeline for generating image prior for Kandinsky
  
  This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods the
  library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)
  
  Args:
      prior ([`PriorTransformer`]):
          The canonincal unCLIP prior to approximate the image embedding from the text embedding.
      image_encoder ([`CLIPVisionModelWithProjection`]):
          Frozen image-encoder.
      text_encoder ([`CLIPTextModelWithProjection`]):
          Frozen text-encoder.
      tokenizer (`CLIPTokenizer`):
          Tokenizer of class
          [CLIPTokenizer](https://huggingface.co/docs/transformers/v4.21.0/en/model_doc/clip#transformers.CLIPTokenizer).
      scheduler ([`UnCLIPScheduler`]):
          A scheduler to be used in combination with `prior` to generate image embedding.
class_docstr_tok: ["Pipeline","for","generating","image","prior","for","Kandinsky","This","model","inherits","from","[","`","DiffusionPipeline","`","]",".","Check","the","superclass","documentation","for","the","generic","methods","the","library","implements","for","all","the","pipelines","(","such","as","downloading","or","saving",",","running","on","a","particular","device",",","etc",".",")","Args",":","prior","(","[","`","PriorTransformer","`","]",")",":","The","canonincal","unCLIP","prior","to","approximate","the","image","embedding","from","the","text","embedding",".","image_encoder","(","[","`","CLIPVisionModelWithProjection","`","]",")",":","Frozen","image-encoder",".","text_encoder","(","[","`","CLIPTextModelWithProjection","`","]",")",":","Frozen","text-encoder",".","tokenizer","(","`","CLIPTokenizer","`",")",":","Tokenizer","of","class","[","CLIPTokenizer","]","(","https",":","\/\/huggingface.co\/docs\/transformers\/v4.21.0\/en\/model_doc\/clip","#","transformers.CLIPTokenizer",")",".","scheduler","(","[","`","UnCLIPScheduler","`","]",")",":","A","scheduler","to","be","used","in","combination","with","`","prior","`","to","generate","image","embedding","."]
code: def get_timesteps(self, num_inference_steps, strength, device):
      # get the original timestep using init_timestep
      init_timestep = min(
          int(num_inference_steps * strength), num_inference_steps
      )
  
      t_start = max(num_inference_steps - init_timestep, 0)
      timesteps = self.scheduler.timesteps[t_start:]
  
      return timesteps, num_inference_steps - t_start
  
file_path: llmga/llmga/diffusers/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_prior_emb2emb.py
imports: from typing import List, Optional, Union
  import PIL.Image
  import torch
  from transformers import CLIPImageProcessor, CLIPTextModelWithProjection, CLIPTokenizer, CLIPVisionModelWithProjection
  from ...models import PriorTransformer
  from ...schedulers import UnCLIPScheduler
  from ...utils import logging, replace_example_docstring
  from ...utils.torch_utils import randn_tensor
  from ..kandinsky import KandinskyPriorPipelineOutput
  from ..pipeline_utils import DiffusionPipeline
label_desc: Use image node_id 2 for calling the KandinskyV22PriorEmb2EmbPipeline obj's underlying member method code with example usage: obj.get_timesteps(num_inference_steps, strength, device) and returns: timesteps,  unknown