the output of the pre-final layer will be used for computing the prompt embeddings.    Encodes the prompt into text encoder hidden states.  generate_caption  < source > ( images  )    Generates caption for a given image.  invert  < source > ( prompt: typing.Optional[str] = None image: typing.Union[PIL.Image.Image, numpy.ndarray, torch.FloatTensor, typing.List[PIL.Image.Image], typing.List[numpy.ndarray], typing.List[torch.FloatTensor]] = None num_inference_steps: int = 50 guidance_scale: float = 1 generator: typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None latents: typing.Optional[torch.FloatTensor] = None prompt_embeds: typing.Optional[torch.FloatTensor] = None cross_attention_guidance_amount: float = 0.1 output_type: typing.Optional[str] = 'pil' return_dict: bool = True callback: typing.Union[typing.Callable[[int, int, torch.FloatTensor], NoneType], NoneType] = None callback_steps: typing.Optional[int] = 1 cross_attention_kwargs: typing.Union[typing.Dict[str, typing.Any], NoneType] = None lambda_auto_corr: float = 20.0 lambda_kl: float = 20.0 num_reg_steps: int = 5 num_auto_corr_rolls: int = 5  )   Parameters   prompt (str or List[str], optional) —