Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| from diffusers import StableDiffusionPipeline | |
| text2img = StableDiffusionPipeline.from_pretrained("Mitsua/mitsua-diffusion-one") | |
| text2img.safety_checker=None # It is practically impossible for Mitsua to generate NSFW images | |
| text2img.to("cuda") | |
| def predict(text): | |
| image = text2img(text).images[0] | |
| return image | |
| demo = gr.Interface( | |
| fn=predict, | |
| inputs='text', | |
| outputs='image', | |
| ) | |
| demo.launch() | |
| #gr.Interface.load("models/Mitsua/mitsua-diffusion-one").launch() |