aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorw-e-w <40751091+w-e-w@users.noreply.github.com>2023-12-10 06:48:16 +0000
committerw-e-w <40751091+w-e-w@users.noreply.github.com>2023-12-10 06:48:16 +0000
commit8b74389e76a7678e972583ef16100e90e1519e55 (patch)
tree816da4ab847f73d7c43478df2044eed144387070
parent23a0e60b9bf90a80f8af9732cc6495fbfce2ea21 (diff)
downloadstable-diffusion-webui-gfx803-8b74389e76a7678e972583ef16100e90e1519e55.tar.gz
stable-diffusion-webui-gfx803-8b74389e76a7678e972583ef16100e90e1519e55.tar.bz2
stable-diffusion-webui-gfx803-8b74389e76a7678e972583ef16100e90e1519e55.zip
fix styles.csv filename
-rw-r--r--modules/styles.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/styles.py b/modules/styles.py
index 07588945..81d9800d 100644
--- a/modules/styles.py
+++ b/modules/styles.py
@@ -98,10 +98,8 @@ class StyleDatabase:
self.path = path
folder, file = os.path.split(self.path)
- self.default_file = file.split("*")[0] + ".csv"
- if self.default_file == ".csv":
- self.default_file = "styles.csv"
- self.default_path = os.path.join(folder, self.default_file)
+ filename, _, ext = file.partition('*')
+ self.default_path = os.path.join(folder, filename + ext)
self.prompt_fields = [field for field in PromptStyle._fields if field != "path"]