target_embeddings = embed_captions(target_captions, tokenizer, text_encoder) And you’re done! Here is a Colab Notebook that you can use to interact with the entire process. Now, you can use these embeddings directly while calling the pipeline:   Copied from diffusers import DDIMScheduler