John6666 commited on
Commit
6322fa2
1 Parent(s): 635b226

Upload 3 files

Browse files
Files changed (2) hide show
  1. flux.py +1 -1
  2. mod.py +1 -1
flux.py CHANGED
@@ -285,7 +285,7 @@ def update_loras(prompt, lora, lora_wt):
285
  if on: lora_prompts.append(f"<lora:{to_lora_key(lora)}:{lora_wt:.2f}>")
286
  output_prompt = ", ".join(list_uniq(output_prompts + lora_prompts))
287
  choices = get_all_lora_tupled_list()
288
- return gr.update(value=output_prompt), gr.update(value=lora, choices=choices), gr.update(value=lora_wt),\
289
  gr.update(value=tag, label=label, visible=on), gr.update(value=md, visible=on)
290
 
291
 
 
285
  if on: lora_prompts.append(f"<lora:{to_lora_key(lora)}:{lora_wt:.2f}>")
286
  output_prompt = ", ".join(list_uniq(output_prompts + lora_prompts))
287
  choices = get_all_lora_tupled_list()
288
+ return gr.update(value=prompt), gr.update(value=lora, choices=choices), gr.update(value=lora_wt),\
289
  gr.update(value=tag, label=label, visible=on), gr.update(value=md, visible=on)
290
 
291
 
mod.py CHANGED
@@ -135,7 +135,7 @@ def fuse_loras(pipe, lorajson: list[dict]):
135
  if not a_list: return
136
  pipe.set_adapters(a_list, adapter_weights=w_list)
137
  pipe.fuse_lora(adapter_names=a_list, lora_scale=1.0)
138
- #pipe.unload_lora_weights()
139
 
140
 
141
  change_base_model.zerogpu = True
 
135
  if not a_list: return
136
  pipe.set_adapters(a_list, adapter_weights=w_list)
137
  pipe.fuse_lora(adapter_names=a_list, lora_scale=1.0)
138
+ pipe.unload_lora_weights()
139
 
140
 
141
  change_base_model.zerogpu = True