feat: use jpeg instead of jpg, use enums instead of strings (#2453)

* fix: parse width and height as int when applying metadata (#2452)

fixes an issue with A1111 metadata scheme where width and height are strings after splitting resolution

* feat: use jpeg instead of jpg, use enums instead of strings
This commit is contained in:
Manuel Schmid
2024-03-09 16:00:25 +01:00
committed by GitHub
parent ee96b854d9
commit b6e4bb86f4
5 changed files with 27 additions and 21 deletions
+11 -6
View File
@@ -67,7 +67,7 @@ default_parameters = {
cn_ip: (0.5, 0.6), cn_ip_face: (0.9, 0.75), cn_canny: (0.5, 1.0), cn_cpds: (0.5, 1.0)
} # stop, weight
output_formats = ['png', 'jpg', 'webp']
output_formats = ['png', 'jpeg', 'webp']
inpaint_engine_versions = ['None', 'v1', 'v2.5', 'v2.6']
inpaint_option_default = 'Inpaint or Outpaint (default)'
@@ -89,11 +89,19 @@ metadata_scheme = [
(f'{MetadataScheme.A1111.value} (plain text)', MetadataScheme.A1111.value),
]
lora_count = 5
controlnet_image_count = 4
class OutputFormat(Enum):
PNG = 'png'
JPEG = 'jpeg'
WEBP = 'webp'
@classmethod
def list(cls) -> list:
return list(map(lambda c: c.value, cls))
class Steps(IntEnum):
QUALITY = 60
SPEED = 30
@@ -120,6 +128,3 @@ class Performance(Enum):
def steps_uov(self) -> int | None:
return StepsUOV[self.name].value if Steps[self.name] else None
performance_selections = Performance.list()