diff --git a/modules/flags.py b/modules/flags.py index adaea1d19..8b35daea3 100644 --- a/modules/flags.py +++ b/modules/flags.py @@ -131,6 +131,10 @@ class Steps(IntEnum): LIGHTNING = 4 HYPER_SD = 4 + @classmethod + def keys(cls) -> list: + return list(map(lambda c: c, Steps.__members__)) + class StepsUOV(IntEnum): QUALITY = 36 diff --git a/modules/meta_parser.py b/modules/meta_parser.py index 02dfc1809..ff930cc0b 100644 --- a/modules/meta_parser.py +++ b/modules/meta_parser.py @@ -119,8 +119,9 @@ def get_steps(key: str, fallback: str | None, source_dict: dict, results: list, assert h is not None h = int(h) # if not in steps or in steps and performance is not the same - if h not in iter(Steps) or Steps(h).name.casefold() != source_dict.get('performance', '').replace(' ', - '_').casefold(): + performance_name = source_dict.get('performance', '').replace(' ', '_').replace('-', '_').casefold() + performance_candidates = [key for key in Steps.keys() if key.casefold() == performance_name and Steps[key] == h] + if len(performance_candidates) == 0: results.append(h) return results.append(-1)