This commit is contained in:
lllyasviel
2023-08-15 09:01:25 -07:00
committed by GitHub
parent 6d4e1d22e7
commit 5e5a2d428f
6 changed files with 23 additions and 5 deletions
+5 -2
View File
@@ -75,7 +75,10 @@ with shared.gradio_root:
lora_model = gr.Dropdown(label=f'SDXL LoRA {i+1}', choices=['None'] + modules.path.lora_filenames, value=modules.path.default_lora_name if i == 0 else 'None')
lora_weight = gr.Slider(label='Weight', minimum=-2, maximum=2, step=0.01, value=modules.path.default_lora_weight)
lora_ctrls += [lora_model, lora_weight]
model_refresh = gr.Button(label='Refresh', value='Refresh All Files', variant='secondary')
with gr.Row():
model_refresh = gr.Button(label='Refresh', value='\U0001f504 Refresh All Files', variant='secondary', elem_classes='refresh_button')
with gr.Accordion(label='Advanced', open=False):
sharpness = gr.Slider(label='Image Sharpness', minimum=0.0, maximum=20.0, step=0.01, value=2.0)
def model_refresh_clicked():
modules.path.update_all_model_names()
@@ -90,7 +93,7 @@ with shared.gradio_root:
advanced_checkbox.change(lambda x: gr.update(visible=x), advanced_checkbox, right_col)
ctrls = [
prompt, negative_prompt, style_selction,
performance_selction, aspect_ratios_selction, image_number, image_seed
performance_selction, aspect_ratios_selction, image_number, image_seed, sharpness
]
ctrls += [base_model, refiner_model] + lora_ctrls
run_button.click(fn=generate_clicked, inputs=ctrls, outputs=[run_button, progress_html, progress_window, gallery])