Keltezaa commited on
Commit
bef78b9
·
verified ·
1 Parent(s): b88ccb2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -314,11 +314,13 @@ def run_lora(prompt, image_input, image_strength, cfg_scale, steps, selected_ind
314
 
315
  selected_loras = [loras_state[idx] for idx in selected_indices]
316
 
 
 
 
317
  base_weight_param = transformer_state_dict.get(base_param_name, None)
318
  if base_weight_param is None:
319
  print(f"Warning: {base_param_name} not found in transformer_state_dict.")
320
-
321
-
322
  # Build the prompt with trigger words
323
  prepends = []
324
  appends = []
 
314
 
315
  selected_loras = [loras_state[idx] for idx in selected_indices]
316
 
317
+ # Initialize transformer_state_dict
318
+ transformer_state_dict = pipe.transformer.state_dict() # Ensure this is correctly defined
319
+
320
  base_weight_param = transformer_state_dict.get(base_param_name, None)
321
  if base_weight_param is None:
322
  print(f"Warning: {base_param_name} not found in transformer_state_dict.")
323
+
 
324
  # Build the prompt with trigger words
325
  prepends = []
326
  appends = []