remove legacy restore resolution

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2025-01-05 14:50:52 -05:00
parent 702d887102
commit 17760cf75b
5 changed files with 13 additions and 9 deletions
+5 -3
View File
@@ -122,12 +122,11 @@ def connect_paste_params_buttons():
if binding.tabname not in paste_fields:
debug(f"Not not registered: tab={binding.tabname}")
continue
"""
# legacy code that sets width/height based on image itself instead of metadata
destination_image_component = paste_fields[binding.tabname]["init_img"]
fields = paste_fields[binding.tabname]["fields"]
override_settings_component = binding.override_settings_component or paste_fields[binding.tabname]["override_settings_component"]
destination_width_component = next(iter([field for field, name in fields if name == "Size-1"] if fields else []), None)
destination_height_component = next(iter([field for field, name in fields if name == "Size-2"] if fields else []), None)
if binding.source_image_component and destination_image_component:
if isinstance(binding.source_image_component, gr.Gallery):
func = send_image_and_dimensions if destination_width_component else image_from_url_text
@@ -142,6 +141,9 @@ def connect_paste_params_buttons():
outputs=[destination_image_component, destination_width_component, destination_height_component] if destination_width_component else [destination_image_component],
show_progress=False,
)
"""
fields = paste_fields[binding.tabname]["fields"]
override_settings_component = binding.override_settings_component or paste_fields[binding.tabname]["override_settings_component"]
if binding.source_text_component is not None and fields is not None:
connect_paste(binding.paste_button, fields, binding.source_text_component, override_settings_component, binding.tabname)
if binding.source_tabname is not None and fields is not None and binding.source_tabname in paste_fields:
+1 -1
View File
@@ -108,7 +108,7 @@ def parse(infotext):
params[f"{key}-2"] = int(size.group(2))
elif isinstance(params[key], str):
params[key] = val
debug(f'Param parsed: type={type(params[key])} {key}={params[key]} raw="{val}"')
debug(f'Param parsed: type={type(params[key])} "{key}"={params[key]} raw="{val}"')
# check_lora(params)
return params
-1
View File
@@ -294,7 +294,6 @@ def set_pipeline_args(p, model, prompts:list, negative_prompts:list, prompts_2:t
debug_log(f'Diffusers task args: {task_args}')
for k, v in task_args.items():
if k in possible:
print('HERE OVERRIDE', k, v)
args[k] = v
else:
debug_log(f'Diffusers unknown task args: {k}={v}')
+2 -2
View File
@@ -784,8 +784,8 @@ options_templates.update(options_section(('ui', "User Interface"), {
"return_mask": OptionInfo(False, "Inpainting include greyscale mask in results"),
"return_mask_composite": OptionInfo(False, "Inpainting include masked composite in results"),
"disable_weights_auto_swap": OptionInfo(True, "Do not change selected model when reading generation parameters"),
"send_seed": OptionInfo(True, "Send seed when sending prompt or image to other interface"),
"send_size": OptionInfo(True, "Send size when sending prompt or image to another interface"),
"send_seed": OptionInfo(True, "Send seed when sending prompt or image to other interface", gr.Checkbox, {"visible": False}),
"send_size": OptionInfo(False, "Send size when sending prompt or image to another interface", gr.Checkbox, {"visible": False}),
"quicksettings_list": OptionInfo(["sd_model_checkpoint"], "Quicksettings list", gr.Dropdown, lambda: {"multiselect":True, "choices": list(opts.data_labels.keys())}),
}))
+5 -2
View File
@@ -658,13 +658,16 @@ def create_ui(_blocks: gr.Blocks=None):
# second pass
(enable_hr, "Second pass"),
(enable_hr, "Refine"),
(hr_sampler_index, "Hires sampler"),
(denoising_strength, "Hires strength"),
(denoising_strength, "Denoising strength"),
(denoising_strength, "Hires strength"),
(hr_sampler_index, "Hires sampler"),
(hr_resize_mode, "Hires mode"),
(hr_resize_context, "Hires context"),
(hr_upscaler, "Hires upscaler"),
(hr_force, "Hires force"),
(hr_second_pass_steps, "Hires steps"),
(hr_scale, "Hires upscale"),
(hr_scale, "Hires scale"),
(hr_resize_x, "Hires fixed-1"),
(hr_resize_y, "Hires fixed-2"),
# refiner