diff --git a/modules/async_worker.py b/modules/async_worker.py index 119f1f27..2ffebb43 100644 --- a/modules/async_worker.py +++ b/modules/async_worker.py @@ -825,6 +825,7 @@ def worker(): ('Fooocus V2 Expansion', 'prompt_expansion', task['expansion']), ('Styles', 'styles', str(raw_style_selections)), ('Performance', 'performance', performance_selection.value), + ('Steps', 'steps', steps), ('Resolution', 'resolution', str((width, height))), ('Guidance Scale', 'guidance_scale', guidance_scale), ('Sharpness', 'sharpness', modules.patch.patch_settings[pid].sharpness), diff --git a/modules/flags.py b/modules/flags.py index 20788807..5180ef13 100644 --- a/modules/flags.py +++ b/modules/flags.py @@ -1,4 +1,4 @@ -from enum import Enum +from enum import IntEnum, Enum disabled = 'Disabled' enabled = 'Enabled' @@ -104,13 +104,13 @@ lora_count_with_lcm = lora_count + 1 controlnet_image_count = 4 -class Steps(Enum): +class Steps(IntEnum): QUALITY = 60 SPEED = 30 EXTREME_SPEED = 8 -class StepsUOV(Enum): +class StepsUOV(IntEnum): QUALITY = 36 SPEED = 18 EXTREME_SPEED = 8 diff --git a/modules/meta_parser.py b/modules/meta_parser.py index aa6bf7a5..66e40dd3 100644 --- a/modules/meta_parser.py +++ b/modules/meta_parser.py @@ -97,7 +97,8 @@ def get_steps(key: str, fallback: str | None, source_dict: dict, results: list, h = source_dict.get(key, source_dict.get(fallback, default)) assert h is not None h = int(h) - if h not in set(item.value for item in Steps): + # 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(): results.append(h) return results.append(-1)