jiuface commited on
Commit
627b83a
1 Parent(s): b8cbb2a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -121,6 +121,10 @@ def run_lora(prompt, lora_strings_json, cfg_scale, steps, randomize_seed, seed,
121
  weights = lora_info.get("weights")
122
  adapter_name = lora_info.get("adapter_name")
123
  adapter_weight = lora_info.get("adapter_weight")
 
 
 
 
124
  if adapter_name in active_adapters:
125
  print(f"Adapter '{adapter_name}' is already loaded, skipping.")
126
  continue
@@ -131,8 +135,7 @@ def run_lora(prompt, lora_strings_json, cfg_scale, steps, randomize_seed, seed,
131
  except ValueError as e:
132
  print(f"Error loading LoRA adapter: {e}")
133
  continue
134
- adapter_names.append(adapter_name)
135
- adapter_weights.append(adapter_weight)
136
  # set lora weights
137
  if len(adapter_names) > 0:
138
  pipe.set_adapters(adapter_names, adapter_weights=adapter_weights)
 
121
  weights = lora_info.get("weights")
122
  adapter_name = lora_info.get("adapter_name")
123
  adapter_weight = lora_info.get("adapter_weight")
124
+
125
+ adapter_names.append(adapter_name)
126
+ adapter_weights.append(adapter_weight)
127
+
128
  if adapter_name in active_adapters:
129
  print(f"Adapter '{adapter_name}' is already loaded, skipping.")
130
  continue
 
135
  except ValueError as e:
136
  print(f"Error loading LoRA adapter: {e}")
137
  continue
138
+
 
139
  # set lora weights
140
  if len(adapter_names) > 0:
141
  pipe.set_adapters(adapter_names, adapter_weights=adapter_weights)