From a10dccdd439f05da35caccf28612a7bb9fbb2d24 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 8 Mar 2024 20:39:13 +1100 Subject: [PATCH] fix(mm): fix bug in control adapter probe default settings Wasn't checking for matches correctly. --- invokeai/backend/model_manager/probe.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/invokeai/backend/model_manager/probe.py b/invokeai/backend/model_manager/probe.py index 49c25fa843..cfcb1f154e 100644 --- a/invokeai/backend/model_manager/probe.py +++ b/invokeai/backend/model_manager/probe.py @@ -346,23 +346,25 @@ class ControlAdapterProbe(ProbeBase): "mlsd": "mlsd_image_processor", "depth": "depth_anything_image_processor", "bae": "normalbae_image_processor", - "normal_bae": "normalbae_image_processor", + "normal": "normalbae_image_processor", "sketch": "pidi_image_processor", "scribble": "lineart_image_processor", "lineart": "lineart_image_processor", "lineart_anime": "lineart_anime_image_processor", "softedge": "hed_image_processor", "shuffle": "content_shuffle_image_processor", - "openpose": "dw_openpose_image_processor", + "pose": "dw_openpose_image_processor", "mediapipe": "mediapipe_face_processor", "pidi": "pidi_image_processor", "zoe": "zoe_depth_image_processor", "color": "color_map_image_processor", } - def get_default_settings(self, model_name: str) -> Optional[ControlAdapterDefaultSettings]: - if model_name in self.MODEL_NAME_TO_PREPROCESSOR: - return ControlAdapterDefaultSettings(preprocessor=self.MODEL_NAME_TO_PREPROCESSOR[model_name]) + @classmethod + def get_default_settings(cls, model_name: str) -> Optional[ControlAdapterDefaultSettings]: + for k, v in cls.MODEL_NAME_TO_PREPROCESSOR.items(): + if k in model_name: + return ControlAdapterDefaultSettings(preprocessor=v) return None