bes-dev / stable_diffusion.openvino

Apache License 2.0
1.54k stars 206 forks source link

use gradio for UI #22

Open AK391 opened 2 years ago

AK391 commented 2 years ago

Hi, there are some nice projects like https://github.com/hlky/stable-diffusion-webui and https://github.com/altryne/sd-webui-colab, which support a gradio web UI, gradio has many features like blocks which allows multiple apps in one and queueing, caching examples, concurrent requests etc

bes-dev commented 2 years ago

@AK391 Oh, I just took the first framework that looked pretty) But, unfortunately, streamlit has a lot of limitations, so I'll look at the Gradio. Thanks!

AK391 commented 2 years ago

@bes-dev awesome, you can see the gradio get started guide here: https://gradio.app/getting_started/, and there is a hosted version of SD on huggingface: https://huggingface.co/spaces/stabilityai/stable-diffusion with the code for the gradio demo here: https://huggingface.co/spaces/stabilityai/stable-diffusion/blob/main/app.py

bes-dev commented 2 years ago

@AK391 hmm, I read about Gradio, and based on this article it looks like Gradio has more limitations that streamlit. Maybe this article is deprecated?

Currently I need more powerful image editing for draw masks and outpainting, and more complicated logic for controls (condition controls creation etc.) :thinking:

AK391 commented 2 years ago

@bes-dev gradio suoports image editing with masking/inpainting you can see this demo for example https://www.youtube.com/watch?v=bu2xwx-6JGk and also UI which is more complex https://github.com/hlky/stable-diffusion-webui/blob/master/webui.py

AK391 commented 2 years ago

@bes-dev gradio now supports iterative outputs using gradio==3.2.1b0 a742e34a-ef36-4f3a-b03c-9478413cf5fc (1)

bes-dev commented 2 years ago

@AK391 hmm, I implemented a dynamic masking tool in streamlit. It looks pretty to me) https://www.youtube.com/watch?v=wkbrRr6PPcY

AK391 commented 2 years ago

@bes-dev great, but i dont think streamlit works in colab notebook like gradio does, we also support queueing and concurrency requests