pt=1,
    output_type="latent",
).images

del pipe.transformer
flush() Notice that while initializing pipe, you’re setting text_encoder to None so that it’s not loaded. Once the latents are computed, pass it off to the VAE to decode into a real image:   Copied with torch.no_grad():
    image = pipe.vae.decode(latents / pipe.vae.config.scaling_factor, return_dict=False)[0]
image = pipe.image_processor.postprocess(image, output_type="pil")[0]
ima