Upload 3 files
Browse files
app.py
CHANGED
@@ -214,8 +214,8 @@ with gr.Blocks(theme=gr.themes.Soft(), fill_width=True, css=css) as app:
|
|
214 |
lora_search_civitai_desc = gr.Markdown(value="", visible=False)
|
215 |
lora_download_url = gr.Textbox(label="URL", placeholder="http://...my_lora_url.safetensors", lines=1)
|
216 |
with gr.Row():
|
217 |
-
lora_slot = gr.Number(label="LoRA slot to set", minimum=1, maximum=num_loras+1, step=1, value=1, scale=1, interactive=True)
|
218 |
lora_download = gr.Button("Get and set LoRA", scale=5)
|
|
|
219 |
|
220 |
gallery.select(
|
221 |
update_selection,
|
@@ -251,8 +251,8 @@ with gr.Blocks(theme=gr.themes.Soft(), fill_width=True, css=css) as app:
|
|
251 |
gr.on(
|
252 |
triggers=[lora_download.click, lora_download_url.submit],
|
253 |
fn=download_my_lora,
|
254 |
-
inputs=[lora_download_url, lora_repo[int(
|
255 |
-
outputs=[lora_repo[int(
|
256 |
scroll_to_output=True,
|
257 |
queue=True,
|
258 |
show_api=False,
|
|
|
214 |
lora_search_civitai_desc = gr.Markdown(value="", visible=False)
|
215 |
lora_download_url = gr.Textbox(label="URL", placeholder="http://...my_lora_url.safetensors", lines=1)
|
216 |
with gr.Row():
|
|
|
217 |
lora_download = gr.Button("Get and set LoRA", scale=5)
|
218 |
+
lora_slot = gr.Number(label="LoRA slot to set", minimum=1, maximum=num_loras, step=1, value=1, scale=1, interactive=True)
|
219 |
|
220 |
gallery.select(
|
221 |
update_selection,
|
|
|
251 |
gr.on(
|
252 |
triggers=[lora_download.click, lora_download_url.submit],
|
253 |
fn=download_my_lora,
|
254 |
+
inputs=[lora_download_url, lora_repo[lambda i: int(i - 1), lora_slot]],
|
255 |
+
outputs=[lora_repo[lambda i: int(i - 1), lora_slot]],
|
256 |
scroll_to_output=True,
|
257 |
queue=True,
|
258 |
show_api=False,
|
flux.py
CHANGED
@@ -248,7 +248,7 @@ def copy_lora(path: str, new_path: str):
|
|
248 |
return None
|
249 |
|
250 |
|
251 |
-
def download_my_lora(dl_urls: str, lora
|
252 |
path = download_lora(dl_urls)
|
253 |
if path: lora = path
|
254 |
choices = get_all_lora_tupled_list()
|
|
|
248 |
return None
|
249 |
|
250 |
|
251 |
+
def download_my_lora(dl_urls: str, lora):
|
252 |
path = download_lora(dl_urls)
|
253 |
if path: lora = path
|
254 |
choices = get_all_lora_tupled_list()
|