jbilcke-hf HF Staff commited on
Commit
0c47721
·
verified ·
1 Parent(s): 60fdd92

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -93,12 +93,12 @@ def getLoraByRepoName(repo_name):
93
  # Return the default values specific to this particular
94
  def getLoraDefaultsByRepoName(repo_name):
95
  # Loop through each lora in sdxl_loras_raw
96
- for lora in lora_defaults:
97
- if lora["repo"] == repo_name:
98
  # Return the lora if the repo name matches
99
- return lora
100
- # If no match is found, return the first lora in the array
101
- return lora_defaults[0] if lora_defaults else None
102
 
103
 
104
  device = "cuda"
 
93
  # Return the default values specific to this particular
94
  def getLoraDefaultsByRepoName(repo_name):
95
  # Loop through each lora in sdxl_loras_raw
96
+ for lora_defs in lora_defaults:
97
+ if lora_defs["model"] == repo_name:
98
  # Return the lora if the repo name matches
99
+ return lora_defs
100
+ # If no match is found, return None
101
+ return None
102
 
103
 
104
  device = "cuda"