Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,64 +1,51 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
from diffusion_webui.helpers import (
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
stable_diffusion_text2img_app,
|
| 16 |
)
|
| 17 |
|
| 18 |
-
app = gr.Blocks()
|
| 19 |
-
with app:
|
| 20 |
-
gr.HTML(
|
| 21 |
-
"""
|
| 22 |
-
<h1 style='text-align: center'>
|
| 23 |
-
Stable Diffusion + ControlNet + Keras Diffusion WebUI
|
| 24 |
-
</h1>
|
| 25 |
-
"""
|
| 26 |
-
)
|
| 27 |
-
gr.Markdown(
|
| 28 |
-
"""
|
| 29 |
-
<h4 style='text-align: center'>
|
| 30 |
-
Follow me for more!
|
| 31 |
-
<a href='https://twitter.com/kadirnar_ai' target='_blank'>Twitter</a> | <a href='https://github.com/kadirnar' target='_blank'>Github</a> | <a href='https://www.linkedin.com/in/kadir-nar/' target='_blank'>Linkedin</a>
|
| 32 |
-
</h4>
|
| 33 |
-
"""
|
| 34 |
-
)
|
| 35 |
-
with gr.Row():
|
| 36 |
-
with gr.Column():
|
| 37 |
-
with gr.Tab("Text2Img"):
|
| 38 |
-
stable_diffusion_text2img_app()
|
| 39 |
-
with gr.Tab("Img2Img"):
|
| 40 |
-
stable_diffusion_img2img_app()
|
| 41 |
-
with gr.Tab("Inpaint"):
|
| 42 |
-
stable_diffusion_inpaint_app()
|
| 43 |
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
with gr.Tab("
|
| 50 |
-
|
| 51 |
-
with gr.Tab("
|
| 52 |
-
|
| 53 |
-
with gr.Tab("
|
| 54 |
-
|
| 55 |
-
with gr.Tab("
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
|
| 60 |
-
|
| 61 |
-
with gr.Tab("Inpaint Canny"):
|
| 62 |
-
stable_diffusion_inpiant_controlnet_canny_app()
|
| 63 |
|
| 64 |
-
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
from diffusion_webui.helpers import (
|
| 4 |
+
StableDiffusionControlNetCannyGenerator,
|
| 5 |
+
StableDiffusionControlNetDepthGenerator,
|
| 6 |
+
StableDiffusionControlNetHEDGenerator,
|
| 7 |
+
StableDiffusionControlNetMLSDGenerator,
|
| 8 |
+
StableDiffusionControlNetPoseGenerator,
|
| 9 |
+
StableDiffusionControlNetScribbleGenerator,
|
| 10 |
+
StableDiffusionControlNetSegGenerator,
|
| 11 |
+
StableDiffusionImage2ImageGenerator,
|
| 12 |
+
StableDiffusionInpaintGenerator,
|
| 13 |
+
StableDiffusionText2ImageGenerator,
|
| 14 |
+
StableDiffusionControlInpaintNetCannyGenerator,
|
|
|
|
| 15 |
)
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
+
def main():
|
| 19 |
+
app = gr.Blocks()
|
| 20 |
+
with app:
|
| 21 |
+
with gr.Row():
|
| 22 |
+
with gr.Column():
|
| 23 |
+
with gr.Tab("Text2Img"):
|
| 24 |
+
StableDiffusionText2ImageGenerator.app()
|
| 25 |
+
with gr.Tab("Img2Img"):
|
| 26 |
+
StableDiffusionImage2ImageGenerator.app()
|
| 27 |
+
with gr.Tab("Inpaint"):
|
| 28 |
+
StableDiffusionInpaintGenerator.app()
|
| 29 |
+
with gr.Tab("ControlNet"):
|
| 30 |
+
with gr.Tab("Canny"):
|
| 31 |
+
StableDiffusionControlNetCannyGenerator.app()
|
| 32 |
+
with gr.Tab("Depth"):
|
| 33 |
+
StableDiffusionControlNetDepthGenerator.app()
|
| 34 |
+
with gr.Tab("HED"):
|
| 35 |
+
StableDiffusionControlNetHEDGenerator.app()
|
| 36 |
+
with gr.Tab("MLSD"):
|
| 37 |
+
StableDiffusionControlNetMLSDGenerator.app()
|
| 38 |
+
with gr.Tab("Pose"):
|
| 39 |
+
StableDiffusionControlNetPoseGenerator.app()
|
| 40 |
+
with gr.Tab("Scribble"):
|
| 41 |
+
StableDiffusionControlNetScribbleGenerator.app()
|
| 42 |
+
with gr.Tab("Seg"):
|
| 43 |
+
StableDiffusionControlNetSegGenerator.app()
|
| 44 |
+
with gr.Tab("ControlNet Inpaint"):
|
| 45 |
+
StableDiffusionControlInpaintNetCannyGenerator.app()
|
| 46 |
|
| 47 |
+
app.launch(debug=True, enable_queue=True)
|
|
|
|
|
|
|
| 48 |
|
| 49 |
+
|
| 50 |
+
if __name__ == "__main__":
|
| 51 |
+
main()
|