File size: 320 Bytes
eea54c9 fb310d8 eea54c9 4bb4982 fb310d8 |
1 2 3 4 5 6 7 8 9 10 11 12 |
from diffusers import StableDiffusionPipeline
import torch
model_id = "runwayml/stable-diffusion-v1-5"
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
prompt = "a photo of an astronaut riding a horse on mars"
image = pipe(prompt).images[0]
image.save("astronaut_rides_horse.png")
|