Fix send buttons and hiresfix

This commit is contained in:
Ean Garvey
2023-12-02 04:40:09 -06:00
parent 2f165d7e32
commit ce77c1cd8a
4 changed files with 7 additions and 6 deletions

View File

@@ -160,6 +160,7 @@ class Image2ImagePipeline(StableDiffusionPipeline):
max_embeddings_multiples,
resample_type,
control_mode,
stencils,
):
# prompts and negative prompts must be a list.
if isinstance(prompts, str):

View File

@@ -178,7 +178,7 @@ if __name__ == "__main__":
button.click(
lambda x: (
x[0]["name"] if len(x) != 0 else None,
gr.Tabs.update(selected=selectedid),
gr.Tabs(selected=selectedid),
),
inputs,
outputs,
@@ -189,7 +189,7 @@ if __name__ == "__main__":
lambda x: (
"None",
x,
gr.Tabs.update(selected=selectedid),
gr.Tabs(selected=selectedid),
),
inputs,
outputs,
@@ -199,7 +199,7 @@ if __name__ == "__main__":
button.click(
lambda x: (
x,
gr.Tabs.update(selected=selectedid),
gr.Tabs(selected=selectedid),
),
inputs,
outputs,

View File

@@ -57,7 +57,6 @@ def txt2img_sdxl_inf(
save_metadata_to_png: bool,
ondemand: bool,
repeatable_seeds: bool,
):
if precision != "fp16":
print("currently we support fp16 for SDXL")

View File

@@ -281,6 +281,7 @@ def txt2img_inf(
cpu_scheduling,
args.max_embeddings_multiples,
stencils=[],
control_mode=None,
resample_type=resample_type,
)
total_time = time.time() - start_time
@@ -689,12 +690,12 @@ with gr.Blocks(title="Text-to-Image", css=dark_theme) as txt2img_web:
# SharkEulerDiscrete doesn't work with img2img which hires_fix uses
def set_compatible_schedulers(hires_fix_selected):
if hires_fix_selected:
return gr.Dropdown.update(
return gr.Dropdown(
choices=scheduler_list_cpu_only,
value="DEISMultistep",
)
else:
return gr.Dropdown.update(
return gr.Dropdown(
choices=scheduler_list,
value="SharkEulerDiscrete",
)