add default_overwrite_step handling for meta data and gradio

allows turbo preset switching to set default_overwrite_step correctly
This commit is contained in:
Manuel Schmid 2023-12-24 23:31:46 +01:00
parent e1f05c64e1
commit 3ba59df559
No known key found for this signature in database
GPG Key ID: 32C4F7569B40B84B
4 changed files with 12 additions and 0 deletions

View File

@ -792,6 +792,7 @@ def worker():
('Refiner Switch', refiner_switch),
('Sampler', sampler_name),
('Scheduler', scheduler_name),
('Sampling Steps Override', advanced_parameters.overwrite_step),
('Seed', task['task_seed']),
]
for li, (n, w) in enumerate(loras):

View File

@ -379,6 +379,7 @@ possible_preset_keys = {
"checkpoint_downloads": "checkpoint_downloads",
"embeddings_downloads": "embeddings_downloads",
"lora_downloads": "lora_downloads",
"default_overwrite_step": "Sampling Steps Override"
}

View File

@ -118,6 +118,14 @@ def load_parameter_button_click(raw_prompt_txt):
except:
results.append(gr.update())
try:
h = loaded_parameter_dict.get('Sampling Steps Override', None)
assert h is not None
h = float(h)
results.append(h)
except:
results.append(gr.update())
try:
h = loaded_parameter_dict.get('Seed', None)
assert h is not None

View File

@ -536,6 +536,7 @@ with shared.gradio_root:
refiner_switch,
sampler_name,
scheduler_name,
overwrite_step,
seed_random,
image_seed,
generate_button,
@ -641,6 +642,7 @@ with shared.gradio_root:
refiner_switch,
sampler_name,
scheduler_name,
overwrite_step,
seed_random,
image_seed,
generate_button,