Commit
·
e6c446b
1
Parent(s):
9d38503
switch models
Browse files
app.py
CHANGED
|
@@ -1,17 +1,14 @@
|
|
| 1 |
import torch
|
| 2 |
import spaces
|
| 3 |
-
from diffusers import ControlNetUnionModel, AutoencoderKL
|
| 4 |
import gradio as gr
|
| 5 |
|
| 6 |
from pipeline.mod_controlnet_tile_sr_sdxl import StableDiffusionXLControlNetTileSRPipeline, calculate_overlap
|
| 7 |
from pipeline.util import (
|
| 8 |
SAMPLERS,
|
| 9 |
-
create_hdr_effect,
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
quantize_8bit,
|
| 13 |
-
select_scheduler,
|
| 14 |
-
torch_gc,
|
| 15 |
)
|
| 16 |
|
| 17 |
device = "cuda"
|
|
@@ -255,6 +252,7 @@ with gr.Blocks(css=css, theme=gr.themes.Ocean(), title="MoD ControlNet Tile Upsc
|
|
| 255 |
)
|
| 256 |
tile_gaussian_sigma = gr.Slider(label="Gaussian Sigma", minimum=0.05, maximum=1.0, step=0.01, value=0.3, visible=False)
|
| 257 |
max_tile_size = gr.Dropdown(label="Max. Tile Size", choices=[1024, 1280], value=1024)
|
|
|
|
| 258 |
resolution = gr.Slider(minimum=128, maximum=8192, value=2048, step=128, label="Resolution")
|
| 259 |
num_inference_steps = gr.Slider(minimum=2, maximum=100, value=30, step=1, label="Inference Steps")
|
| 260 |
guidance_scale = gr.Slider(minimum=1, maximum=20, value=6, step=0.1, label="Guidance Scale")
|
|
@@ -272,7 +270,7 @@ with gr.Blocks(css=css, theme=gr.themes.Ocean(), title="MoD ControlNet Tile Upsc
|
|
| 272 |
with gr.Accordion(label="Example Images", open=True):
|
| 273 |
with gr.Row(elem_id="examples_row"):
|
| 274 |
with gr.Column(scale=12, elem_id="examples_container"):
|
| 275 |
-
|
| 276 |
examples=[
|
| 277 |
[ "./examples/1.jpg",
|
| 278 |
"RealVisXL 5 Lightning",
|
|
|
|
| 1 |
import torch
|
| 2 |
import spaces
|
| 3 |
+
from diffusers import ControlNetUnionModel, AutoencoderKL
|
| 4 |
import gradio as gr
|
| 5 |
|
| 6 |
from pipeline.mod_controlnet_tile_sr_sdxl import StableDiffusionXLControlNetTileSRPipeline, calculate_overlap
|
| 7 |
from pipeline.util import (
|
| 8 |
SAMPLERS,
|
| 9 |
+
create_hdr_effect,
|
| 10 |
+
progressive_upscale,
|
| 11 |
+
select_scheduler
|
|
|
|
|
|
|
|
|
|
| 12 |
)
|
| 13 |
|
| 14 |
device = "cuda"
|
|
|
|
| 252 |
)
|
| 253 |
tile_gaussian_sigma = gr.Slider(label="Gaussian Sigma", minimum=0.05, maximum=1.0, step=0.01, value=0.3, visible=False)
|
| 254 |
max_tile_size = gr.Dropdown(label="Max. Tile Size", choices=[1024, 1280], value=1024)
|
| 255 |
+
with gr.Row():
|
| 256 |
resolution = gr.Slider(minimum=128, maximum=8192, value=2048, step=128, label="Resolution")
|
| 257 |
num_inference_steps = gr.Slider(minimum=2, maximum=100, value=30, step=1, label="Inference Steps")
|
| 258 |
guidance_scale = gr.Slider(minimum=1, maximum=20, value=6, step=0.1, label="Guidance Scale")
|
|
|
|
| 270 |
with gr.Accordion(label="Example Images", open=True):
|
| 271 |
with gr.Row(elem_id="examples_row"):
|
| 272 |
with gr.Column(scale=12, elem_id="examples_container"):
|
| 273 |
+
gr.Examples(
|
| 274 |
examples=[
|
| 275 |
[ "./examples/1.jpg",
|
| 276 |
"RealVisXL 5 Lightning",
|