mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
fix sd model dict xyz
This commit is contained in:
+4
-4
@@ -7,12 +7,12 @@ Second stage of a jumbo merge from upstream plus few minor changes...
|
||||
- simplify token merging
|
||||
- reorganize some settings
|
||||
- all updates from upstream: A1111 v1.3.2 [df004be] (latest release)
|
||||
pretty much nothing major that i haven't relased in previous versions, but its still a long list of tiny changes
|
||||
- skipped:
|
||||
pretty much nothing major that i haven't released in previous versions, but its still a long list of tiny changes
|
||||
- skipped/did-not-port:
|
||||
add separate hires prompt: unnecessarily complicated and spread over large number of commits due to many regressions
|
||||
allow external scripts to add cross-optimization methods: dangerous and i don't see a use case for it so far
|
||||
load extension info in threads: unnecessary as other optimizations i've already put place perform equally good
|
||||
- broken:
|
||||
load extension info in threads: unnecessary as other optimizations ive already put place perform equally good
|
||||
- broken/reverted:
|
||||
sub-quadratic optimization changes
|
||||
|
||||
## Update for 06/13/2023
|
||||
|
||||
Submodule extensions-builtin/sd-webui-controlnet updated: caf54076e1...c9c7317cea
+1
-1
@@ -432,7 +432,7 @@
|
||||
{"id":"","label":"uniform","localized":"","hint":""},
|
||||
{"id":"","label":"quad","localized":"","hint":""},
|
||||
{"id":"","label":"sigma churn","localized":"","hint":""},
|
||||
{"id":"","label":"Negative Guidance minimum sigma","localized":"","hint":"Skip negative prompt for some steps when the image is almost ready, 0=disable"},
|
||||
{"id":"","label":"sigma negative guidance minimum","localized":"","hint":"Skip negative prompt for some steps when the image is almost ready, 0=disable"},
|
||||
{"id":"","label":"sigma tmin","localized":"","hint":""},
|
||||
{"id":"","label":"sigma noise","localized":"","hint":""},
|
||||
{"id":"","label":"Noise seed delta (eta)","localized":"","hint":""},
|
||||
|
||||
@@ -212,11 +212,12 @@ div#extras_scale_to_tab div.form{
|
||||
min-height: 1.3em;
|
||||
font-size: 0.8em;
|
||||
transition: opacity 0.2s ease-in;
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.tooltip-show {
|
||||
opacity: 1;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
/* settings */
|
||||
|
||||
+2
-2
@@ -454,14 +454,14 @@ options_templates.update(options_section(('sampler-params', "Sampler Settings"),
|
||||
"eta_ddim": OptionInfo(0.0, "Noise multiplier for DDIM (eta)", gr.Slider, {"minimum": 0.0, "maximum": 1.0, "step": 0.01}),
|
||||
"ddim_discretize": OptionInfo('uniform', "DDIM discretize img2img", gr.Radio, {"choices": ['uniform', 'quad']}),
|
||||
's_churn': OptionInfo(0.0, "sigma churn", gr.Slider, {"minimum": 0.0, "maximum": 1.0, "step": 0.01}),
|
||||
's_min_uncond': OptionInfo(0, "Negative Guidance minimum sigma", gr.Slider, {"minimum": 0.0, "maximum": 4.0, "step": 0.01}),
|
||||
's_min_uncond': OptionInfo(0, "sigma negative guidance minimum ", gr.Slider, {"minimum": 0.0, "maximum": 4.0, "step": 0.01}),
|
||||
's_tmin': OptionInfo(0.0, "sigma tmin", gr.Slider, {"minimum": 0.0, "maximum": 1.0, "step": 0.01}),
|
||||
's_noise': OptionInfo(1.0, "sigma noise", gr.Slider, {"minimum": 0.0, "maximum": 1.0, "step": 0.01}),
|
||||
'eta_noise_seed_delta': OptionInfo(0, "Noise seed delta (eta)", gr.Number, {"precision": 0}),
|
||||
'always_discard_next_to_last_sigma': OptionInfo(False, "Always discard next-to-last sigma"),
|
||||
'uni_pc_variant': OptionInfo("bh1", "UniPC variant", gr.Radio, {"choices": ["bh1", "bh2", "vary_coeff"]}),
|
||||
'uni_pc_skip_type': OptionInfo("time_uniform", "UniPC skip type", gr.Radio, {"choices": ["time_uniform", "time_quadratic", "logSNR"]}),
|
||||
'uni_pc_order': OptionInfo(3, "UniPC order (must be < sampling steps)", gr.Slider, {"minimum": 1, "maximum": 50, "step": 1}),
|
||||
'uni_pc_order': OptionInfo(3, "UniPC order (must be < sampling steps)", gr.Slider, {"minimum": 1, "maximum": 10, "step": 1}),
|
||||
'uni_pc_lower_order_final': OptionInfo(True, "UniPC lower order final"),
|
||||
}))
|
||||
|
||||
|
||||
+15
-8
@@ -70,16 +70,23 @@ def apply_checkpoint(p, x, xs):
|
||||
return
|
||||
info = sd_models.get_closet_checkpoint_match(x)
|
||||
if info is None:
|
||||
shared.log.warning(f"XYZ grid: unknown checkpoint: {x}")
|
||||
shared.log.warning(f"XYZ grid: apply checkpoint unknown checkpoint: {x}")
|
||||
else:
|
||||
sd_models.reload_model_weights(shared.sd_model, info)
|
||||
p.override_settings['sd_model_checkpoint'] = info.name
|
||||
|
||||
|
||||
def confirm_checkpoints(p, xs):
|
||||
for x in xs:
|
||||
if sd_models.get_closet_checkpoint_match(x) is None:
|
||||
shared.log.warning(f"XYZ grid: Unknown checkpoint: {x}")
|
||||
def apply_dict(p, x, xs):
|
||||
if x == shared.opts.sd_model_dict:
|
||||
return
|
||||
info_dict = sd_models.get_closet_checkpoint_match(x)
|
||||
info_ckpt = sd_models.get_closet_checkpoint_match(shared.opts.sd_model_checkpoint)
|
||||
if info_dict is None or info_ckpt is None:
|
||||
shared.log.warning(f"XYZ grid: apply dict unknown checkpoint: {x}")
|
||||
else:
|
||||
shared.opts.sd_model_dict = info_dict.name # this will trigger reload_model_weights via onchange handler
|
||||
p.override_settings['sd_model_checkpoint'] = info_ckpt.name
|
||||
p.override_settings['sd_model_dict'] = info_dict.name
|
||||
|
||||
|
||||
def apply_clip_skip(p, x, xs):
|
||||
@@ -200,9 +207,9 @@ class AxisOptionTxt2Img(AxisOption):
|
||||
|
||||
axis_options = [
|
||||
AxisOption("Nothing", str, do_nothing, fmt=format_nothing),
|
||||
AxisOption("Checkpoint name", str, apply_checkpoint, fmt=format_value, confirm=confirm_checkpoints, cost=1.0, choices=lambda: list(sd_models.checkpoints_list)),
|
||||
AxisOption("Checkpoint name", str, apply_checkpoint, fmt=format_value, cost=1.0, choices=lambda: list(sd_models.checkpoints_list)),
|
||||
AxisOption("VAE", str, apply_vae, cost=0.7, choices=lambda: ['None'] + list(sd_vae.vae_dict)),
|
||||
AxisOption("Dict name", str, apply_checkpoint, fmt=format_value, confirm=confirm_checkpoints, cost=1.0, choices=lambda: ['None'] + list(sd_models.checkpoints_list)),
|
||||
AxisOption("Dict name", str, apply_dict, fmt=format_value, cost=1.0, choices=lambda: ['None'] + list(sd_models.checkpoints_list)),
|
||||
AxisOption("Prompt S/R", str, apply_prompt, fmt=format_value),
|
||||
AxisOption("Styles", str, apply_styles, choices=lambda: list(shared.prompt_styles.styles)),
|
||||
AxisOptionTxt2Img("Sampler", str, apply_sampler, fmt=format_value, confirm=confirm_samplers, choices=lambda: [x.name for x in sd_samplers.samplers]),
|
||||
@@ -378,7 +385,7 @@ class Script(scripts.Script):
|
||||
with gr.Row():
|
||||
with gr.Column(scale=19):
|
||||
with gr.Row():
|
||||
x_type = gr.Dropdown(label="X type", choices=[x.label for x in self.current_axis_options], value=self.current_axis_options[1].label, type="index", elem_id=self.elem_id("x_type"))
|
||||
x_type = gr.Dropdown(label="X type", choices=[x.label for x in self.current_axis_options], value=self.current_axis_options[0].label, type="index", elem_id=self.elem_id("x_type"))
|
||||
x_values = gr.Textbox(label="X values", lines=1, elem_id=self.elem_id("x_values"))
|
||||
x_values_dropdown = gr.Dropdown(label="X values",visible=False,multiselect=True,interactive=True)
|
||||
fill_x_button = ToolButton(value=fill_values_symbol, elem_id="xyz_grid_fill_x_tool_button", visible=False)
|
||||
|
||||
Reference in New Issue
Block a user