# resize image to 1024x1024 for SDXL
image_inpainting = image_inpainting.resize((1024, 1024))
```  
Now let's pass the image to another inpainting pipeline with SDXL's refiner model to enhance the image details and quality:  
```py
pipeline = AutoPipelineForInpainting.from_pretrained(
"stabilityai/stable-diffusion-xl-refiner-1.0", torch_dtype=torch.float16, variant="fp16"
)
pipeline.enable_model_cpu_offload()
# remove following line if xFormers is not installed or you have PyTorch 2.0 or higher installed