import torch generator = torch.Generator("cuda").manual_seed(1024) image = pipe(prompt, guidance_scale=7.5, num_inference_steps=15, generator=generator).images[0] # you can save the image with # image.save(f"astronaut_rides_horse.png")