File size: 1,062 Bytes
2204ef0
 
50bd6a9
cab0202
 
f5da000
 
 
1e1a292
 
 
50bd6a9
f5da000
 
 
 
cab0202
f5da000
cab0202
f5da000
cab0202
f5da000
cab0202
 
 
 
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
import gradio as gr

from diffusion_webui import (
    StableDiffusionControlNetGenerator,
    StableDiffusionControlNetInpaintGenerator,
    StableDiffusionImage2ImageGenerator,
    StableDiffusionInpaintGenerator,
    StableDiffusionText2ImageGenerator,
)


def diffusion_app():
    app = gr.Blocks()
    with app:
        with gr.Row():
            with gr.Column():
                with gr.Tab(label="Text2Image"):
                    StableDiffusionText2ImageGenerator.app()
                with gr.Tab(label="Image2Image"):
                    StableDiffusionImage2ImageGenerator.app()
                with gr.Tab(label="Inpaint"):
                    StableDiffusionInpaintGenerator.app()
                with gr.Tab(label="Controlnet"):
                    StableDiffusionControlNetGenerator.app()
                with gr.Tab(label="Controlnet Inpaint"):
                    StableDiffusionControlNetInpaintGenerator.app()

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


if __name__ == "__main__":
    diffusion_app()