aboutsummaryrefslogtreecommitdiffstats
path: root/modules/styles.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2022-10-02 14:03:01 +0000
committerGitHub <noreply@github.com>2022-10-02 14:03:01 +0000
commita9d7eb722f9034d1d2203dada6d79651ad3edeec (patch)
treef622f9f86b77a46f673a08084d4a10db59aeff40 /modules/styles.py
parentf28ce3e3a17ccd9b4a03317031a4e3caa1a3088f (diff)
parent4e72a1aab6d1b3a8d8c09fadc81843a07c05cc18 (diff)
downloadstable-diffusion-webui-gfx803-a9d7eb722f9034d1d2203dada6d79651ad3edeec.tar.gz
stable-diffusion-webui-gfx803-a9d7eb722f9034d1d2203dada6d79651ad3edeec.tar.bz2
stable-diffusion-webui-gfx803-a9d7eb722f9034d1d2203dada6d79651ad3edeec.zip
Merge branch 'master' into saving
Diffstat (limited to 'modules/styles.py')
-rw-r--r--modules/styles.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/styles.py b/modules/styles.py
index eeedcd08..d44dfc1a 100644
--- a/modules/styles.py
+++ b/modules/styles.py
@@ -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])