Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -199,9 +199,9 @@ if torch.cuda.is_available():
199
  else:
200
  pipe = None
201
 
202
- styles = {k["name"]: (k["prompt"], k["negative_prompt"]) for k in config.style_list}
203
- quality_prompt = {
204
- k["name"]: (k["prompt"], k["negative_prompt"]) for k in config.quality_prompt_list
205
  }
206
 
207
  wildcard_files = utils.load_wildcard_files("wildcard")
 
199
  else:
200
  pipe = None
201
 
202
+ #get来获取键的值
203
+ styles = {k["name"]: (k.get("prompt", ""), k.get("negative_prompt", "")) for k in config.style_list}
204
+ quality_prompt = {k["name"]: (k.get("prompt", ""), k.get("negative_prompt", "")) for k in config.quality_prompt_list
205
  }
206
 
207
  wildcard_files = utils.load_wildcard_files("wildcard")