From ff4df06c573c7054f736e0b5a35c24fad2427ab0 Mon Sep 17 00:00:00 2001 From: RnDMonkey Date: Thu, 29 Sep 2022 20:01:32 -0700 Subject: refined [styles] pattern and added [prompt_no_styles] --- modules/styles.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modules/styles.py') 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]) -- cgit v1.2.3