Prior Transformer The Prior Transformer was originally introduced in Hierarchical Text-Conditional Image Generation with CLIP Latents by Ramesh et al. It is used to predict CLIP image embeddings from CLIP text embeddings; image embeddings are predicted through a denoising diffusion process. The abstract from the paper is: Contrastive models like CLIP have been shown to learn robust representations of images that capture both semantics and style. To leverage these representations for image generation, we propose a two-stage model: a prior that generates a CLIP image embedding given a text caption, and a decoder that generates an image conditioned on the image embedding. We show that explicitly generating image representations improves image diversity with minimal loss in photorealism and caption similarity. Our decoders conditioned on image representations can also produce variations of an image that preserve both its semantics and style, while varying the non-essential details absent from the image representation. Moreover, the joint embedding space of CLIP enables language-guided image manipulations in a zero-shot fashion. We use diffusion models for the decoder and experiment with both autoregressive and diffusion models for the prior, finding that the latter are computationally more efficient and produce higher-quality samples.  PriorTransformer  class diffusers.PriorTransformer  < source > ( num_attention_heads: int = 32 attention_head_dim: int = 64 num_layers: int = 20 embedding_dim: int = 768 num_embeddings = 77 additional_embeddings = 4 dropout: float = 0.0 time_embed_act_fn: str = 'silu' norm_in_type: Optional = None embedding_proj_norm_type: Optional = None encoder_hid_proj_type: Optional = 'linear' added_emb_type: Optional = 'prd' time_embed_dim: Optional = None embedding_proj_dim: Optional = None clip_embed_dim: Optional = None  )   Parameters   num_attention_heads (int, optional, defaults to 32) — The number of heads to use for multi-head attention.   attention_head_dim (int, optional, defaults to 64) — The number of channels in each head.   num_layers (int, optional, defaults to 20) — The number of layers of Transformer blocks to use.   embedding_dim (int, optional, defaults to 768) — The dimension of the model input hidden_states   num_embeddings (int, optional, defaults to 77) —