 the vae to decode the latent representation into an image and get the decoded output with sample:


	Copied
# scale and decode the image latents with vae
latents = 1 / 0.18215 * latents
with torch.no_grad():
    image = vae.decode(latents).sample
Lastly, convert the image to a PIL.Image to see your generated image!


	Copied
>>> image = (image / 2 + 0.5).clamp(0, 1)
>>> image = image.detach().cpu().permute(0, 2, 3, 1).numpy()
>>> images = (ima