mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-01-30 04:11:15 -08:00
refined [styles] pattern and added [prompt_no_styles]
This commit is contained in:
parent
d18daafb8b
commit
ff4df06c57
3 changed files with 15 additions and 3 deletions
|
|
@ -53,6 +53,12 @@ class StyleDatabase:
|
|||
negative_prompt = row.get("negative_prompt", "")
|
||||
self.styles[row["name"]] = PromptStyle(row["name"], prompt, negative_prompt)
|
||||
|
||||
def get_style_prompts(self, styles):
|
||||
return [self.styles.get(x, self.no_style).prompt for x in styles]
|
||||
|
||||
def get_negative_style_prompts(self, styles):
|
||||
return [self.styles.get(x, self.no_style).negative_prompt for x in styles]
|
||||
|
||||
def apply_styles_to_prompt(self, prompt, styles):
|
||||
return apply_styles_to_prompt(prompt, [self.styles.get(x, self.no_style).prompt for x in styles])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue