Spaces:
Runtime error
Runtime error
File size: 357 Bytes
3fc1f11 b92f87e 3fc1f11 e298350 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import gradio as gr
from diffusers import StableDiffusionPipeline
import torch
# Load the model on CPU instead of GPU
pipe = StableDiffusionPipeline.from_pretrained("sivar/legostyle1-5")
pipe = pipe.to("cpu")
def infer(prompt):
image = pipe(prompt).images[0]
return image
gr.Interface(fn=infer, inputs="text", outputs="image").launch(share=True)
|