botware's picture
Update app.py
0eebd08
Raw History Blame Contribute Delete
287 Bytes
import torch
from diffusers import StableDiffusionPipeline
pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4")
#for GPU driver
#pipe.to("cuda")
prompt = "a photograph of an astronaut riding a horse"
image = pipe(prompt, height=1080, width=1080).images[0]