Prueba-Gradio / app.py
Javitron4257's picture
Modificamos para usar stable difusion
45d7de9 verified
raw
history blame contribute delete
320 Bytes
import gradio as gr
from diffusers import DiffusionPipeline
import torch
def stable(prompt):
pipeline = DiffusionPipeline.from_pretrained("sd-legacy/stable-diffusion-v1-5", torch_dtype=torch.float32)
return pipeline(prompt).images[0]
demo = gr.Interface(fn=stable, inputs="text", outputs="image")
demo.launch()