Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apply performance from metadata #3153

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions modules/flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions modules/meta_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down