diff --git a/javascript/black-orange.css b/javascript/black-orange.css index 7a18eeecf..1d8e5523b 100644 --- a/javascript/black-orange.css +++ b/javascript/black-orange.css @@ -81,7 +81,7 @@ svg.feather.feather-image, .feather .feather-image { display: none } #quicksettings > div, #quicksettings > fieldset { min-width: 24em; max-width: 26em; line-height: 2em; } #refresh_sd_model_checkpoint { height: 48px; margin-left: -14px; background: #333333; box-shadow: none; } #open_folder_extras, #footer, #style_pos_col, #style_neg_col, #roll_col, #extras_upscaler_2, #extras_upscaler_2_visibility, #txt2img_seed_resize_from_w, #txt2img_seed_resize_from_h { display: none; } -#refresh_txt2img_styles, #refresh_img2img_styles { height: 40px; margin-left: -8px; } +#refresh_txt2img_styles, #refresh_img2img_styles { height: 45px; margin-left: -8px; } #save-animation { border-radius: 0 !important; margin-bottom: 16px; background-color: #111111; } #script_list { padding: 4px; margin-top: 20px; margin-bottom: 20px; } #settings > div.flex-wrap { width: 15em; } diff --git a/javascript/style.css b/javascript/style.css index f11bd9d31..02781546f 100644 --- a/javascript/style.css +++ b/javascript/style.css @@ -92,6 +92,7 @@ button.custom-button{ .performance p{ display: inline-block; + color: var(--primary-100) !important } .performance .time { @@ -116,7 +117,7 @@ a{ #txt2img_gallery img, #img2img_gallery img, #extras_gallery img{ object-fit: scale-down; width: -webkit-fill-available !important; - height: -webkit-fill-available !important; + height: inherit !important; } #txt2img_actions_column, #img2img_actions_column { gap: 0.5em; diff --git a/modules/generation_parameters_copypaste.py b/modules/generation_parameters_copypaste.py index 1fb8d159a..1ea0e24cb 100644 --- a/modules/generation_parameters_copypaste.py +++ b/modules/generation_parameters_copypaste.py @@ -350,7 +350,9 @@ def create_override_settings_dict(text_pairs): def connect_paste(button, local_paste_fields, input_comp, override_settings_component, tabname): + def paste_func(prompt): + shared.log.debug(f'paste prompt: {prompt}') if prompt is not None and 'Negative prompt' not in prompt and 'Steps' not in prompt: prompt = None if not prompt and not shared.cmd_opts.hide_ui_dir_config: diff --git a/modules/ui_common.py b/modules/ui_common.py index cfd9e6ee9..e5582086d 100644 --- a/modules/ui_common.py +++ b/modules/ui_common.py @@ -31,7 +31,7 @@ def plaintext_to_html(text): def infotext_to_html(text): - res = '

Prompt: ' + html.escape(text).replace('\n', '
') + '

' + res = '

Prompt: ' + html.escape(text or '').replace('\n', '
') + '

' sections = res.split('Steps:') # before and after prompt+negprompt' if len(sections) > 1: res = sections[0] + '
Steps: ' + sections[1].strip().replace(', ', ' | ') @@ -86,7 +86,7 @@ def save_files(js_data, images, do_make_zip, index): filenames = [] fullfns = [] for image_index, filedata in enumerate(images, start_index): - if 'name' in filedata and os.path.isfile(filedata['name']): + if 'name' in filedata and ('tmp' not in filedata['name']) and os.path.isfile(filedata['name']): fullfn = filedata['name'] filenames.append(os.path.basename(fullfn)) fullfns.append(fullfn) @@ -186,7 +186,6 @@ def create_output_panel(tabname, outdir): paste_field_names = [] for paste_tabname, paste_button in buttons.items(): parameters_copypaste.register_paste_params_button(parameters_copypaste.ParamBinding( - paste_button=paste_button, tabname=paste_tabname, source_tabname=("txt2img" if tabname == "txt2img" else None), source_image_component=result_gallery, - paste_field_names=paste_field_names + paste_button=paste_button, tabname=paste_tabname, source_tabname=("txt2img" if tabname == "txt2img" else None), source_image_component=result_gallery, paste_field_names=paste_field_names )) return result_gallery, generation_info, html_info, html_log diff --git a/modules/ui_postprocessing.py b/modules/ui_postprocessing.py index 860316e49..bd928e277 100644 --- a/modules/ui_postprocessing.py +++ b/modules/ui_postprocessing.py @@ -8,7 +8,7 @@ from modules.ui_common import infotext_to_html def wrap_pnginfo(image): _, geninfo, info = run_pnginfo(image) - return '', infotext_to_html(geninfo), info + return '', infotext_to_html(geninfo), info, geninfo def submit_click(tab_index, extras_image, image_batch, extras_batch_input_dir, extras_batch_output_dir, show_extras_results, *script_inputs): @@ -45,18 +45,18 @@ def create_ui(): result_images, generation_info, html_info, html_log = ui_common.create_output_panel("extras", shared.opts.outdir_extras_samples) gr.HTML('File metadata') exif_info = gr.HTML(elem_id="pnginfo_html_info") + gen_info = gr.Text(elem_id="pnginfo_gen_info", visible=False) for tabname, button in buttons.items(): - parameters_copypaste.register_paste_params_button(parameters_copypaste.ParamBinding(paste_button=button, tabname=tabname, source_text_component=html_info, source_image_component=extras_image)) + parameters_copypaste.register_paste_params_button(parameters_copypaste.ParamBinding(paste_button=button, tabname=tabname, source_text_component=gen_info, source_image_component=extras_image)) tab_single.select(fn=lambda: 0, inputs=[], outputs=[tab_index]) tab_batch.select(fn=lambda: 1, inputs=[], outputs=[tab_index]) tab_batch_dir.select(fn=lambda: 2, inputs=[], outputs=[tab_index]) - # html_info.change(fn=pretty_geninfo, inputs=[html_info], outputs=[html_info_pretty]) _dummy = gr.HTML(visible=False) extras_image.change( fn=wrap_gradio_call(wrap_pnginfo), inputs=[extras_image], - outputs=[_dummy, html_info, exif_info], + outputs=[_dummy, html_info, exif_info, gen_info], ) submit.click( fn=call_queue.wrap_gradio_gpu_call(submit_click, extra_outputs=[None, '']),