diff --git a/internal_controlnet/args.py b/internal_controlnet/args.py index 50e32802e..a32ec5218 100644 --- a/internal_controlnet/args.py +++ b/internal_controlnet/args.py @@ -292,7 +292,7 @@ def legacy_field_alias(cls, values: dict) -> dict: for alias, key in ext_compat_keys.items(): if alias in values: assert key not in values, f"Conflict of field '{alias}' and '{key}'" - values[key] = alias + values[key] = values[alias] cls.cls_logger.warn( f"Deprecated alias '{alias}' detected. This field will be removed on 2024-06-01" f"Please use '{key}' instead." diff --git a/unit_tests/args_test.py b/unit_tests/args_test.py index de9158220..af2529788 100644 --- a/unit_tests/args_test.py +++ b/unit_tests/args_test.py @@ -239,3 +239,7 @@ def test_infotext_parsing(): pixel_perfect=True, control_mode="Balanced", ) == ControlNetUnit.parse(infotext) + + +def test_alias(): + ControlNetUnit.from_dict({"lowvram": True})