multiple loras in preset

This commit is contained in:
lllyasviel
2023-11-15 02:41:49 -08:00
parent a662567f6c
commit 3a9c3c07d1
7 changed files with 14 additions and 26 deletions
+4 -3
View File
@@ -275,10 +275,11 @@ with shared.gradio_root:
with gr.Accordion(label='LoRAs (SDXL or SD 1.5)', open=True):
lora_ctrls = []
for i in range(5):
for i, (n, v) in enumerate(modules.config.default_loras):
with gr.Row():
lora_model = gr.Dropdown(label=f'LoRA {i+1}', choices=['None'] + modules.config.lora_filenames, value=modules.config.default_lora_name if i == 0 else 'None')
lora_weight = gr.Slider(label='Weight', minimum=-2, maximum=2, step=0.01, value=modules.config.default_lora_weight)
lora_model = gr.Dropdown(label=f'LoRA {i+1}', choices=['None'] + modules.config.lora_filenames, value=n)
lora_weight = gr.Slider(label='Weight', minimum=-2, maximum=2, step=0.01, value=v)
lora_ctrls += [lora_model, lora_weight]
with gr.Row():
model_refresh = gr.Button(label='Refresh', value='\U0001f504 Refresh All Files', variant='secondary', elem_classes='refresh_button')