TastyRice commited on
Commit
94639c2
1 Parent(s): 82c01e0

Update app.py

Browse files
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
  character_files = utils.load_character_files("character")
 
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
  character_files = utils.load_character_files("character")