diff --git a/modules/generation_parameters_copypaste.py b/modules/generation_parameters_copypaste.py index fc9e17aa2..8464d3430 100644 --- a/modules/generation_parameters_copypaste.py +++ b/modules/generation_parameters_copypaste.py @@ -88,7 +88,14 @@ def add_paste_fields(tabname, init_img, fields): def create_buttons(tabs_list): buttons = {} for tab in tabs_list: - buttons[tab] = gr.Button(f"Send to {tab}", elem_id=f"{tab}_tab") + name = tab + if name == 'txt2img': + name = 'text' + elif name == 'img2img': + name = 'image' + elif name == 'extras': + name = 'process' + buttons[tab] = gr.Button(f"➠ {name}", elem_id=f"{tab}_tab") return buttons diff --git a/modules/ui.py b/modules/ui.py index 1da512aca..11c8e41f0 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -197,7 +197,7 @@ def create_seed_inputs(target_interface): subseed.style(container=False) random_subseed = gr.Button(random_symbol, elem_id=target_interface + '_random_subseed') reuse_subseed = gr.Button(reuse_symbol, elem_id=target_interface + '_reuse_subseed') - subseed_strength = gr.Slider(label='Variation strength', value=0.0, minimum=0, maximum=1, step=0.01, elem_id=target_interface + '_subseed_strength') + subseed_strength = gr.Slider(label='strength', value=0.0, minimum=0, maximum=1, step=0.01, elem_id=target_interface + '_subseed_strength') with FormRow(visible=False) as seed_extra_row_2: seed_extras.append(seed_extra_row_2) @@ -476,8 +476,9 @@ def create_ui(): elif category == "dimensions": with FormRow(): with gr.Column(elem_id="txt2img_column_size", scale=4): - width = gr.Slider(minimum=64, maximum=2048, step=8, label="Width", value=512, elem_id="txt2img_width") - height = gr.Slider(minimum=64, maximum=2048, step=8, label="Height", value=512, elem_id="txt2img_height") + with FormRow(elem_id="txt2img_row_dimension"): + width = gr.Slider(minimum=128, maximum=2048, step=8, label="Width", value=512, elem_id="txt2img_width") + height = gr.Slider(minimum=128, maximum=2048, step=8, label="Height", value=512, elem_id="txt2img_height") res_switch_btn = ToolButton(value=switch_values_symbol, elem_id="txt2img_res_switch_btn") if opts.dimensions_and_batch_together: @@ -745,7 +746,7 @@ def create_ui(): ) with FormRow(): - resize_mode = gr.Radio(label="Resize mode", elem_id="resize_mode", choices=["Just resize", "Crop and resize", "Resize and fill", "Just resize (latent upscale)"], type="index", value="Just resize") + resize_mode = gr.Radio(label="Resize mode", elem_id="resize_mode", choices=["Just resize", "Crop and resize", "Resize and fill", "Just resize"], type="index", value="Just resize") for category in ordered_ui_categories(): if category == "sampler": diff --git a/scripts/postprocessing_codeformer.py b/scripts/postprocessing_codeformer.py index a7d80d40e..fb016e88a 100644 --- a/scripts/postprocessing_codeformer.py +++ b/scripts/postprocessing_codeformer.py @@ -14,7 +14,7 @@ class ScriptPostprocessingCodeFormer(scripts_postprocessing.ScriptPostprocessing def ui(self): with FormRow(): codeformer_visibility = gr.Slider(minimum=0.0, maximum=1.0, step=0.001, label="CodeFormer visibility", value=0, elem_id="extras_codeformer_visibility") - codeformer_weight = gr.Slider(minimum=0.0, maximum=1.0, step=0.001, label="CodeFormer weight (0 = maximum effect, 1 = minimum effect)", value=0, elem_id="extras_codeformer_weight") + codeformer_weight = gr.Slider(minimum=0.0, maximum=1.0, step=0.001, label="CodeFormer weight (0 = max), 1 = min)", value=0, elem_id="extras_codeformer_weight") return { "codeformer_visibility": codeformer_visibility, diff --git a/ui-config.json b/ui-config.json index 8b8e55f6b..8cbe3d954 100644 --- a/ui-config.json +++ b/ui-config.json @@ -934,5 +934,20 @@ "img2img/Image CFG Scale/value": 1.5, "img2img/Image CFG Scale/minimum": 0, "img2img/Image CFG Scale/maximum": 3.0, - "img2img/Image CFG Scale/step": 0.05 + "img2img/Image CFG Scale/step": 0.05, + "txt2img/strength/visible": true, + "txt2img/strength/value": 0.0, + "txt2img/strength/minimum": 0, + "txt2img/strength/maximum": 1, + "txt2img/strength/step": 0.01, + "img2img/strength/visible": true, + "img2img/strength/value": 0.0, + "img2img/strength/minimum": 0, + "img2img/strength/maximum": 1, + "img2img/strength/step": 0.01, + "customscript/postprocessing_codeformer.py/extras/CodeFormer weight (0 = max), 1 = min)/visible": true, + "customscript/postprocessing_codeformer.py/extras/CodeFormer weight (0 = max), 1 = min)/value": 0, + "customscript/postprocessing_codeformer.py/extras/CodeFormer weight (0 = max), 1 = min)/minimum": 0.0, + "customscript/postprocessing_codeformer.py/extras/CodeFormer weight (0 = max), 1 = min)/maximum": 1.0, + "customscript/postprocessing_codeformer.py/extras/CodeFormer weight (0 = max), 1 = min)/step": 0.001 } \ No newline at end of file diff --git a/user.css b/user.css index 3a68b2357..7e2767702 100644 --- a/user.css +++ b/user.css @@ -14,21 +14,21 @@ input[type=range]::-webkit-slider-thumb { box-shadow: 2px 2px 3px #111111; borde div.gradio-container.dark > div.w-full.flex.flex-col.min-h-screen > div { background-color: black; } /* gradio shadowroot */ -.gradio-container { font-family: "Segoe UI"; font-variant: small-caps; --left-column: 540px; --highlight-color: #CE6400; --inactive-color: #4E1400; } +.gradio-container { font-family: "Segoe UI"; font-variant: small-caps; --left-column: 440px; --highlight-color: #CE6400; --inactive-color: #4E1400; } /* gradio style classes */ .border-2 { border-width: 0; } .border-b-2 { border-bottom-width: 2px; border-color: var(--highlight-color) !important; padding-bottom: 2px; margin-bottom: 8px; } .dark .bg-gray-200, .dark .\!bg-gray-200 { background-color: transparent; } -.dark .bg-white { color: lightyellow; border-radius: 0; } +.dark .bg-white { color: lightyellow; border-radius: 0; background-color: var(--inactive-color); } .dark .dark\:bg-gray-900 { background-color: black; } -.dark .gr-box { border-radius: 0 !important; background-color: #111111; box-shadow: 2px 2px 3px #111111; border-width: 0; padding-bottom: 12px; } -.dark .gr-button { border-radius: 0; font-weight: normal; box-shadow: 2px 2px 3px #111111; font-size: 0.9rem; min-width: 42px; min-height: 42px; } +.dark .gr-box { border-radius: 0 !important; background-color: #111111; box-shadow: 2px 2px 3px #111111; border-width: 0; padding: 4px; margin-bottom: 4px; } +.dark .gr-button { border-radius: 0; font-weight: normal; box-shadow: 2px 2px 3px #111111; font-size: 0.9rem; min-width: 36px; min-height: 36px; padding: 6px; } .dark .gr-check-radio { background-color: var(--inactive-color); border-width: 0; border-radius: 2px; box-shadow: 2px 2px 3px #111111; } .dark .gr-check-radio:checked { background-color: var(--highlight-color); } .dark .gr-compact { border-radius: 0; background-color: black; } .dark .gr-form { border-radius: 0; border-width: 0; } -.dark .gr-input { background-color: #333333 !important; } +.dark .gr-input { background-color: #333333 !important; padding: 4px; margin: 4px; } .dark .gr-input-label { color: lightyellow; border-width: 0; background: transparent; padding: 2px !important; } .dark .gr-panel { border-radius: 0; background-color: black; } .dark { background-color: black; } @@ -38,32 +38,30 @@ div.gradio-container.dark > div.w-full.flex.flex-col.min-h-screen > div { backgr .extra-network-cards .card:hover { transform: scale(2); transition: all 0.3s ease; z-index: 99; box-shadow: none; } .extra-network-cards .card .actions .name { font-weight: 400; font-size: 1.2rem; } .gap-2 { padding-top: 8px; } -.gr-box > div > div > input.gr-text-input { right: 0.8rem; width: 6em; } +.gr-box > div > div > input.gr-text-input { right: 0.8rem; width: 5em; } .overflow-hidden .flex .flex-col .relative col .gap-4 { min-width: var(--left-column); max-width: var(--left-column); } /* this is a problematic one */ .p-2 { padding: 0; } .px-4 { padding-lefT: 1rem; padding-right: 1rem; } .py-6 { padding-bottom: 0; } .rounded-lg { border-radius: 0; } .tabs { background-color: black; } +#settings > div.flex-wrap { width: 15em; } /* automatic style classes */ .progressDiv .progress { background: var(--highlight-color); border-radius: 2px; } .gallery-item { box-shadow: none !important; } +.performance { color: #888 } /* gradio elements overrides */ -#footer { display: none; } #img2img_label_copy_to_img2img { font-weight: normal; } #img2img_neg_prompt > label > textarea { font-size: 1.2rem; } #img2img_prompt > label > textarea { font-size: 1.2rem; } #interrogate, #deepbooru { margin: 0em 0 0 0.25em; } -#open_folder_txt2img, #open_folder_img2img, #open_folder_extras { display: none; } -#refresh_txt2img_styles, #refresh_img2img_styles { display: none; } #save-animation { border-radius: 0 !important; margin-bottom: 16px; background-color: #111111; } -#style_pos_col, #style_neg_col, #roll_col { display: none; } #tab_extensions table { background-color: #222222; } #txt2img_checkboxes, #img2img_checkboxes { background-color: transparent; } #txt2img_gallery, #img2img_gallery, #extras_gallery { background: black; } -#txt2img_generate, #img2img_generate, #txt2img_interrupt, #img2img_interrupt, #txt2img_skip, #img2img_skip { margin-left: 10px; min-height: 2rem; height: 63px; max-width: 200px; } +#txt2img_generate, #img2img_generate, #txt2img_interrupt, #img2img_interrupt, #txt2img_skip, #img2img_skip { margin-left: 10px; min-height: 2rem; height: 2rem; max-width: 200px; margin-top: 12px; border: none; border-radius: 0; } #txt2img_interrupt, #img2img_interrupt, #txt2img_skip, #img2img_skip { background-color: var(--inactive-color); } #txt2img_neg_prompt > label > textarea { font-size: 1.2rem; } #txt2img_progress_row > div { min-width: var(--left-column); max-width: var(--left-column); } @@ -73,3 +71,6 @@ div.gradio-container.dark > div.w-full.flex.flex-col.min-h-screen > div { backgr #txt2img_settings, #img2img_settings { min-width: var(--left-column); max-width: var(--left-column); background-color: #111111; margin-top: 1rem; } #txt2img_subseed_show { min-width: 74px; padding: 0 0 0 6px; } #txtimg_hr_finalres { max-width: 200px; } +#txt2img_tools, #img2img_tools { margin-left: 8px; } +#txt2img_checkboxes, #img2img_checkboxes { margin-bottom: 0.2em; } +#refresh_txt2img_styles, #refresh_img2img_styles, #open_folder_txt2img, #open_folder_img2img, #open_folder_extras, #footer, #style_pos_col, #style_neg_col, #roll_col, #save_zip_txt2img, #save_zip_img2img, #extras_upscaler_2, #extras_upscaler_2_visibility, #txt2img_res_switch_btn { display: none; }