aboutsummaryrefslogtreecommitdiffstats
path: root/modules/styles.py
diff options
context:
space:
mode:
authorJairo Correa <jn.j41r0@gmail.com>2022-09-30 21:58:51 +0000
committerJairo Correa <jn.j41r0@gmail.com>2022-09-30 21:58:51 +0000
commitad1fbbae93fa17f797a76bc59220d074990b85b4 (patch)
tree79ff375c07afee8597598bbcc6fb693ff912dab4 /modules/styles.py
parentc2d5b29040132c171bc4d77f1f63da972306f22c (diff)
parent84e97a98c5233119d0f444e0a3a0f6391da23677 (diff)
downloadstable-diffusion-webui-gfx803-ad1fbbae93fa17f797a76bc59220d074990b85b4.tar.gz
stable-diffusion-webui-gfx803-ad1fbbae93fa17f797a76bc59220d074990b85b4.tar.bz2
stable-diffusion-webui-gfx803-ad1fbbae93fa17f797a76bc59220d074990b85b4.zip
Merge branch 'master' into fix-vram
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])