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
+2 -2
View File
@@ -8,7 +8,7 @@ import modules.sdxl_styles
from modules.model_loader import load_file_from_url
from modules.util import get_files_from_folder, makedirs_with_log
from modules.flags import Performance, MetadataScheme
from modules.flags import OutputFormat, Performance, MetadataScheme
def get_config_path(key, default_value):
env = os.getenv(key)
@@ -326,7 +326,7 @@ default_max_image_number = get_config_item_or_set_default(
default_output_format = get_config_item_or_set_default(
key='default_output_format',
default_value='png',
validator=lambda x: x in modules.flags.output_formats
validator=lambda x: x in OutputFormat.list()
)
default_image_number = get_config_item_or_set_default(
key='default_image_number',