class_docstr: Pipeline for Zero-Shot Subject Driven Generation using Blip Diffusion.
  
  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:
      tokenizer ([`CLIPTokenizer`]):
          Tokenizer for the text encoder
      text_encoder ([`ContextCLIPTextModel`]):
          Text encoder to encode the text prompt
      vae ([`AutoencoderKL`]):
          VAE model to map the latents to the image
      unet ([`UNet2DConditionModel`]):
          Conditional U-Net architecture to denoise the image embedding.
      scheduler ([`PNDMScheduler`]):
           A scheduler to be used in combination with `unet` to generate image latents.
      qformer ([`Blip2QFormerModel`]):
          QFormer model to get multi-modal embeddings from the text and image.
      image_processor ([`BlipImageProcessor`]):
          Image Processor to preprocess and postprocess the image.
      ctx_begin_pos (int, `optional`, defaults to 2):
          Position of the context token in the text encoder.
class_docstr_tok: ["Pipeline","for","Zero-Shot","Subject","Driven","Generation","using","Blip","Diffusion",".","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",":","tokenizer","(","[","`","CLIPTokenizer","`","]",")",":","Tokenizer","for","the","text","encoder","text_encoder","(","[","`","ContextCLIPTextModel","`","]",")",":","Text","encoder","to","encode","the","text","prompt","vae","(","[","`","AutoencoderKL","`","]",")",":","VAE","model","to","map","the","latents","to","the","image","unet","(","[","`","UNet2DConditionModel","`","]",")",":","Conditional","U-Net","architecture","to","denoise","the","image","embedding",".","scheduler","(","[","`","PNDMScheduler","`","]",")",":","A","scheduler","to","be","used","in","combination","with","`","unet","`","to","generate","image","latents",".","qformer","(","[","`","Blip2QFormerModel","`","]",")",":","QFormer","model","to","get","multi-modal","embeddings","from","the","text","and","image",".","image_processor","(","[","`","BlipImageProcessor","`","]",")",":","Image","Processor","to","preprocess","and","postprocess","the","image",".","ctx_begin_pos","(","int",",","`","optional","`",",","defaults","to","2",")",":","Position","of","the","context","token","in","the","text","encoder","."]
code: def __init__(
      self,
      tokenizer: CLIPTokenizer,
      text_encoder: ContextCLIPTextModel,
      vae: AutoencoderKL,
      unet: UNet2DConditionModel,
      scheduler: PNDMScheduler,
      qformer: Blip2QFormerModel,
      image_processor: BlipImageProcessor,
      ctx_begin_pos: int = 2,
      mean: List[float] = None,
      std: List[float] = None,
  ):
      super().__init__()
  
      self.register_modules(
          tokenizer=tokenizer,
          text_encoder=text_encoder,
          vae=vae,
          unet=unet,
          scheduler=scheduler,
          qformer=qformer,
          image_processor=image_processor,
      )
      self.register_to_config(
          ctx_begin_pos=ctx_begin_pos, mean=mean, std=std
      )
  
file_path: llmga/llmga/diffusers/src/diffusers/pipelines/blip_diffusion/pipeline_blip_diffusion.py
imports: from typing import List, Optional, Union
  import PIL.Image
  import torch
  from transformers import CLIPTokenizer
  from ...models import AutoencoderKL, UNet2DConditionModel
  from ...schedulers import PNDMScheduler
  from ...utils import logging, replace_example_docstring
  from ...utils.torch_utils import randn_tensor
  from ..pipeline_utils import DiffusionPipeline, ImagePipelineOutput
  from .blip_image_processing import BlipImageProcessor
  from .modeling_blip2 import Blip2QFormerModel
  from .modeling_ctx_clip import ContextCLIPTextModel
label_desc: Use image node_id 1 to create a new BlipDiffusionPipeline object from inherited base classes: DiffusionPipeline with example: obj = BlipDiffusionPipeline(tokenizer, text_encoder, vae, unet, scheduler, qformer, image_processor, ctx_begin_pos, mean, std)