Spaces:
Runtime error
Runtime error
from diffusers import StableDiffusionPipeline, EulerDiscreteScheduler | |
model_id = "stabilityai/stable-diffusion-2" | |
scheduler = EulerDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler") | |
pipe = StableDiffusionPipeline.from_pretrained(model_id, scheduler=scheduler, torch_dtype=torch.float16) | |
pipe = pipe.to("cuda") | |
prompt = "a photo of an astronaut riding a horse on mars" | |
image = pipe(prompt).images[0] | |