target_embeds = embed_prompts(target_prompts, pipeline.tokenizer, pipeline.text_encoder) Finally, pass the embeddings to the generate_mask() and invert() functions, and pipeline to generate the image:   Copied   from diffusers import DDIMInverseScheduler, DDIMScheduler