3mrology's picture
Update app.py
1552e6c
raw
history blame contribute delete
655 Bytes
import gradio as gr
from PIL import Image
from pathlib import Path
from multiprocessing import cpu_count
import requests
import io
import os
from PIL import Image
from diffusers import (
DiffusionPipeline,
StableDiffusionPipeline,
StableDiffusionControlNetImg2ImgPipeline,
ControlNetModel,
DDIMScheduler,
DPMSolverMultistepScheduler,
DEISMultistepScheduler,
HeunDiscreteScheduler,
EulerDiscreteScheduler,
)
pipeline = DiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5")
def generate(prompt):
return pipeline(prompt)
iface = gr.Interface(fn=generate, inputs="text", outputs="image")
iface.launch()