updated new model
Browse files- app.py +3 -3
- models/controlnet.py +2 -2
app.py
CHANGED
@@ -83,8 +83,8 @@ def ui():
|
|
83 |
)
|
84 |
with gr.Accordion(label='Preprocess', open=True):
|
85 |
with gr.Row():
|
86 |
-
threshold1 = gr.Slider(minimum=-1, maximum=255, step=1, value
|
87 |
-
threshold2 = gr.Slider(minimum=-1, maximum=255, step=1, value
|
88 |
process_button = gr.Button("Process", variant='primary', min_width=96, scale=0)
|
89 |
with gr.Row():
|
90 |
scheduler = gr.Dropdown(
|
@@ -98,7 +98,7 @@ def ui():
|
|
98 |
num_inference_steps = gr.Slider(minimum=1, maximum=100, step=1, value=28, label='Steps')
|
99 |
with gr.Row():
|
100 |
cfg_scale = gr.Slider(minimum=1, maximum=30, step=1, value=7.5, label='CFG Scale')
|
101 |
-
controlnet_scale = gr.Slider(minimum=0, maximum=1, step=0.01, value=
|
102 |
with gr.Row():
|
103 |
seed = gr.Number(label='Seed', step=1, precision=0, value=-1)
|
104 |
with gr.Column(scale=1):
|
|
|
83 |
)
|
84 |
with gr.Accordion(label='Preprocess', open=True):
|
85 |
with gr.Row():
|
86 |
+
threshold1 = gr.Slider(minimum=-1, maximum=255, step=1, value=-1, label='Threshold 1', info='-1 for auto')
|
87 |
+
threshold2 = gr.Slider(minimum=-1, maximum=255, step=1, value=-1, label='Threshold 2', info='-1 for auto')
|
88 |
process_button = gr.Button("Process", variant='primary', min_width=96, scale=0)
|
89 |
with gr.Row():
|
90 |
scheduler = gr.Dropdown(
|
|
|
98 |
num_inference_steps = gr.Slider(minimum=1, maximum=100, step=1, value=28, label='Steps')
|
99 |
with gr.Row():
|
100 |
cfg_scale = gr.Slider(minimum=1, maximum=30, step=1, value=7.5, label='CFG Scale')
|
101 |
+
controlnet_scale = gr.Slider(minimum=0, maximum=1, step=0.01, value=1, label='ControlNet Scale')
|
102 |
with gr.Row():
|
103 |
seed = gr.Number(label='Seed', step=1, precision=0, value=-1)
|
104 |
with gr.Column(scale=1):
|
models/controlnet.py
CHANGED
@@ -353,10 +353,10 @@ class ControlNetModel(ModelMixin, ConfigMixin):
|
|
353 |
nn.Conv2d(3, 64, kernel_size=3, stride=2, padding=1),
|
354 |
nn.GroupNorm(2, 64),
|
355 |
nn.ReLU(),
|
356 |
-
nn.Conv2d(64, 64, kernel_size=3),
|
357 |
nn.GroupNorm(2, 64),
|
358 |
nn.ReLU(),
|
359 |
-
nn.Conv2d(64, 128, kernel_size=3),
|
360 |
nn.GroupNorm(2, 128),
|
361 |
nn.ReLU(),
|
362 |
)
|
|
|
353 |
nn.Conv2d(3, 64, kernel_size=3, stride=2, padding=1),
|
354 |
nn.GroupNorm(2, 64),
|
355 |
nn.ReLU(),
|
356 |
+
nn.Conv2d(64, 64, kernel_size=3, padding=1),
|
357 |
nn.GroupNorm(2, 64),
|
358 |
nn.ReLU(),
|
359 |
+
nn.Conv2d(64, 128, kernel_size=3, padding=1),
|
360 |
nn.GroupNorm(2, 128),
|
361 |
nn.ReLU(),
|
362 |
)
|