File size: 4,209 Bytes
2204ef0
 
50bd6a9
29c6952
02e289c
f5da000
 
 
02e289c
 
 
 
 
 
5a1997f
 
f5da000
5a1997f
 
f5da000
 
 
5a1997f
 
f5da000
 
 
1e1a292
 
 
50bd6a9
f5da000
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50bd6a9
 
f5da000
 
5a1997f
 
 
 
 
 
 
 
 
 
f5da000
02e289c
 
 
 
 
 
 
 
 
 
 
 
 
 
29c6952
 
 
828cdd9
f5da000
8bf6bdc
f5da000
 
50bd6a9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import gradio as gr

from diffusion_webui import (
    CodeformerUpscalerGenerator,
    StableDiffusionControlInpaintNetDepthGenerator,
    StableDiffusionControlNetCannyGenerator,
    StableDiffusionControlNetDepthGenerator,
    StableDiffusionControlNetHEDGenerator,
    StableDiffusionControlNetInpaintCannyGenerator,
    StableDiffusionControlNetInpaintHedGenerator,
    StableDiffusionControlNetInpaintMlsdGenerator,
    StableDiffusionControlNetInpaintPoseGenerator,
    StableDiffusionControlNetInpaintScribbleGenerator,
    StableDiffusionControlNetInpaintSegGenerator,
    StableDiffusionControlNetLineArtAnimeGenerator,
    StableDiffusionControlNetLineArtGenerator,
    StableDiffusionControlNetMLSDGenerator,
    StableDiffusionControlNetNormalGenerator,
    StableDiffusionControlNetPix2PixGenerator,
    StableDiffusionControlNetPoseGenerator,
    StableDiffusionControlNetScribbleGenerator,
    StableDiffusionControlNetSegGenerator,
    StableDiffusionControlNetShuffleGenerator,
    StableDiffusionControlNetSoftEdgeGenerator,
    StableDiffusionImage2ImageGenerator,
    StableDiffusionInpaintGenerator,
    StableDiffusionText2ImageGenerator,
)


def diffusion_app():
    app = gr.Blocks()
    with app:
        with gr.Row():
            with gr.Column():
                with gr.Tab("Text2Img"):
                    StableDiffusionText2ImageGenerator.app()
                with gr.Tab("Img2Img"):
                    StableDiffusionImage2ImageGenerator.app()
                with gr.Tab("Inpaint"):
                    StableDiffusionInpaintGenerator.app()
                with gr.Tab("ControlNet"):
                    with gr.Tab("Canny"):
                        StableDiffusionControlNetCannyGenerator.app()
                    with gr.Tab("Depth"):
                        StableDiffusionControlNetDepthGenerator.app()
                    with gr.Tab("HED"):
                        StableDiffusionControlNetHEDGenerator.app()
                    with gr.Tab("MLSD"):
                        StableDiffusionControlNetMLSDGenerator.app()
                    with gr.Tab("Pose"):
                        StableDiffusionControlNetPoseGenerator.app()
                    with gr.Tab("Scribble"):
                        StableDiffusionControlNetScribbleGenerator.app()
                    with gr.Tab("Normal"):
                        StableDiffusionControlNetNormalGenerator.app()
                    with gr.Tab("Seg"):
                        StableDiffusionControlNetSegGenerator.app()
                    with gr.Tab("Shuffle"):
                        StableDiffusionControlNetShuffleGenerator.app()
                    with gr.Tab("Pix2Pix"):
                        StableDiffusionControlNetPix2PixGenerator.app()
                    with gr.Tab("LineArt"):
                        StableDiffusionControlNetLineArtGenerator.app()
                    with gr.Tab("LineArtAnime"):
                        StableDiffusionControlNetLineArtAnimeGenerator.app()
                    with gr.Tab("SoftEdge"):
                        StableDiffusionControlNetSoftEdgeGenerator.app()
                with gr.Tab("ControlNet Inpaint"):
                    with gr.Tab("Canny"):
                        StableDiffusionControlNetInpaintCannyGenerator.app()
                    with gr.Tab("Depth"):
                        StableDiffusionControlInpaintNetDepthGenerator.app()
                    with gr.Tab("HED"):
                        StableDiffusionControlNetInpaintHedGenerator.app()
                    with gr.Tab("MLSD"):
                        StableDiffusionControlNetInpaintMlsdGenerator.app()
                    with gr.Tab("Pose"):
                        StableDiffusionControlNetInpaintPoseGenerator.app()
                    with gr.Tab("Scribble"):
                        StableDiffusionControlNetInpaintScribbleGenerator.app()
                    with gr.Tab("Seg"):
                        StableDiffusionControlNetInpaintSegGenerator.app()
                with gr.Tab("Upscaler"):
                    CodeformerUpscalerGenerator.app()

    app.queue(concurrency_count=1)
    app.launch(debug=True, enable_queue=True)


if __name__ == "__main__":
    diffusion_app()