ple x_t -> x_t-1
...     latents = scheduler.step(noise_pred, t, latents).prev_sample  Decode the image The final step is to use 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!   C