Taking lot of time

#130
by hsay - opened

I have copied the code in my Kaggle notebook using gpu accelerator but it is taking a lot of time

from diffusers import StableDiffusionPipeline
import torch

model_id = "runwayml/stable-diffusion-v1-5"
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
pipe = pipe.to("cuda")

prompt = "a photo of an astronaut riding a horse on mars"
image = pipe(prompt).images[0]

image.save("astronaut_rides_horse.png")
how to optimize?

Sign up or log in to comment