aboutsummaryrefslogtreecommitdiff
path: root/modules/styles.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-05-18 10:12:17 +0300
committerGitHub <noreply@github.com>2023-05-18 10:12:17 +0300
commit182330ae40c93b761fced8d03bbdd8523f1739d0 (patch)
treec95f2e531cc34475eb39266add6d12a2a5e1e2b3 /modules/styles.py
parent0d31f20cbd556ea4ba3d8ad9254bcce71c32088c (diff)
parent983f2c494ad8fed2f08193681ba0bf5dda01555a (diff)
Merge branch 'dev' into ngrok-py
Diffstat (limited to 'modules/styles.py')
-rw-r--r--modules/styles.py11
1 files changed, 1 insertions, 10 deletions
diff --git a/modules/styles.py b/modules/styles.py
index 11642075..34e1b5e1 100644
--- a/modules/styles.py
+++ b/modules/styles.py
@@ -1,18 +1,9 @@
-# We need this so Python doesn't complain about the unknown StableDiffusionProcessing-typehint at runtime
-from __future__ import annotations
-
import csv
import os
import os.path
import typing
-import collections.abc as abc
-import tempfile
import shutil
-if typing.TYPE_CHECKING:
- # Only import this when code is being type-checked, it doesn't have any effect at runtime
- from .processing import StableDiffusionProcessing
-
class PromptStyle(typing.NamedTuple):
name: str
@@ -52,7 +43,7 @@ class StyleDatabase:
return
with open(self.path, "r", encoding="utf-8-sig", newline='') as file:
- reader = csv.DictReader(file)
+ reader = csv.DictReader(file, skipinitialspace=True)
for row in reader:
# Support loading old CSV format with "name, text"-columns
prompt = row["prompt"] if "prompt" in row else row["text"]