diff options
author | Chris OBryan <13701027+cobryan05@users.noreply.github.com> | 2022-10-28 18:24:11 +0000 |
---|---|---|
committer | Chris OBryan <13701027+cobryan05@users.noreply.github.com> | 2022-10-28 18:33:49 +0000 |
commit | 26d08193848568b06105a1ee7b76f338ebf0f0ee (patch) | |
tree | 741db2017b16d4182a50dcc326c7c194db01ed26 /modules/ui.py | |
parent | 737eb28faca8be2bb996ee0930ec77d1f7ebd939 (diff) | |
download | stable-diffusion-webui-gfx803-26d08193848568b06105a1ee7b76f338ebf0f0ee.tar.gz stable-diffusion-webui-gfx803-26d08193848568b06105a1ee7b76f338ebf0f0ee.tar.bz2 stable-diffusion-webui-gfx803-26d08193848568b06105a1ee7b76f338ebf0f0ee.zip |
extras: Add option to run upscaling before face fixing
Face restoration can look much better if ran after upscaling, as it
allows the restoration to fix upscaling artifacts. This patch adds
an option to choose which order to run upscaling/face fixing in.
Diffstat (limited to 'modules/ui.py')
-rw-r--r-- | modules/ui.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/ui.py b/modules/ui.py index 0a63e357..16b6ac49 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -1119,6 +1119,9 @@ def create_ui(wrap_gradio_gpu_call): codeformer_visibility = gr.Slider(minimum=0.0, maximum=1.0, step=0.001, label="CodeFormer visibility", value=0, interactive=modules.codeformer_model.have_codeformer)
codeformer_weight = gr.Slider(minimum=0.0, maximum=1.0, step=0.001, label="CodeFormer weight (0 = maximum effect, 1 = minimum effect)", value=0, interactive=modules.codeformer_model.have_codeformer)
+ with gr.Group():
+ upscale_before_face_fix = gr.Checkbox(label='Upscale Before Restoring Faces', value=False)
+
submit = gr.Button('Generate', elem_id="extras_generate", variant='primary')
with gr.Column(variant='panel'):
@@ -1152,6 +1155,7 @@ def create_ui(wrap_gradio_gpu_call): extras_upscaler_1,
extras_upscaler_2,
extras_upscaler_2_visibility,
+ upscale_before_face_fix,
],
outputs=[
result_images,
|