make_image_grid([init_image, mask_image, image_inpainting, image], rows=2, cols=2)  initial image  inpaint  image-to-image Image-to-image and inpainting are actually very similar tasks. Image-to-image generates a new image that resembles the existing provided image. Inpainting does the same thing, but it only transforms the image area defined by the mask and the rest of the image is unchanged. You can think of inpainting as a more precise tool for making specific changes and image-to-image has a broader scope for making more sweeping changes.  Control image generation Getting an image to look exactly the way you want is challenging because the denoising process is random. While you can control certain aspects of generation by configuring parameters like negative_prompt, there are better and more efficient methods for controlling image generation.  Prompt weighting Prompt weighting provides a quantifiable way to scale the representation of concepts in a prompt. You can use it to increase or decrease the magnitude of the text embedding vector for each concept in the prompt, which subsequently determines how much of each concept is generated. The Compel library offers an intuitive syntax for scaling the prompt weights and generating the embeddings. Learn how to create the embeddings in the Prompt weighting guide. Once you’ve generated the embeddings, pass them to the prompt_embeds (and negative_prompt_embeds if you’re using a negative prompt) parameter in the AutoPipelineForInpainting. The embeddings replace the prompt parameter:   Copied import torch