return Image.fromarray(image_array)
```  
2. Create a function to decode and save the latents into an image.  
```py
def decode_tensors(pipe, step, timestep, callback_kwargs):
latents = callback_kwargs["latents"]

image = latents_to_rgb(latents[0])
image.save(f"{step}.png")