image = base(prompt=prompt, output_type="latent").images[0]
```  
Pass the generated image to the refiner model:  
```py
image = refiner(prompt=prompt, image=image[None, :]).images[0]
```  
<div class="flex gap-4">
<div>
<img class="rounded-xl" src="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/sd_xl/init_image.png" alt="generated image of an astronaut riding a green horse on Mars" />
<figcaption class="mt-2 text-center text-sm text-gray-500">base model</figcaption>
</div>
<div>