kadirnar commited on
Commit
f5da000
1 Parent(s): a22dacf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +43 -56
app.py CHANGED
@@ -1,64 +1,51 @@
1
  import gradio as gr
2
 
3
  from diffusion_webui.helpers import (
4
- keras_stable_diffusion_app,
5
- stable_diffusion_controlnet_canny_app,
6
- stable_diffusion_controlnet_depth_app,
7
- stable_diffusion_controlnet_hed_app,
8
- stable_diffusion_controlnet_mlsd_app,
9
- stable_diffusion_controlnet_pose_app,
10
- stable_diffusion_controlnet_scribble_app,
11
- stable_diffusion_controlnet_seg_app,
12
- stable_diffusion_img2img_app,
13
- stable_diffusion_inpaint_app,
14
- stable_diffusion_inpiant_controlnet_canny_app,
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
- with gr.Tab("ControlNet"):
45
- with gr.Tab("Canny"):
46
- stable_diffusion_controlnet_canny_app()
47
- with gr.Tab("Depth"):
48
- stable_diffusion_controlnet_depth_app()
49
- with gr.Tab("HED"):
50
- stable_diffusion_controlnet_hed_app()
51
- with gr.Tab("MLSD"):
52
- stable_diffusion_controlnet_mlsd_app()
53
- with gr.Tab("Pose"):
54
- stable_diffusion_controlnet_pose_app()
55
- with gr.Tab("Seg"):
56
- stable_diffusion_controlnet_seg_app()
57
- with gr.Tab("Scribble"):
58
- stable_diffusion_controlnet_scribble_app()
 
 
 
 
 
 
 
 
 
 
 
 
 
59
 
60
- with gr.Tab("ControlNet Inpaint"):
61
- with gr.Tab("Inpaint Canny"):
62
- stable_diffusion_inpiant_controlnet_canny_app()
63
 
64
- app.launch(debug=True, enable_queue=True)
 
 
 
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()