{"record":{"id":"80a5efa32f69fb8c","repo":"invoke-ai/InvokeAI","slug":"unrecognized-adapter-type-adapter-type","errorCode":null,"errorMessage":"unrecognized adapter_type '{adapter_type}'","messagePattern":"unrecognized adapter_type '(.+?)'","errorType":"validation","errorClass":"NotAMatchError","httpStatus":null,"severity":"error","filePath":"invokeai/backend/model_manager/configs/t2i_adapter.py","lineNumber":71,"sourceCode":"        \"\"\"Raise `NotAMatch` if the model base does not match this config class.\"\"\"\n        expected_base = cls.model_fields[\"base\"].default\n        recognized_base = cls._get_base_or_raise(mod)\n        if expected_base is not recognized_base:\n            raise NotAMatchError(f\"base is {recognized_base}, not {expected_base}\")\n\n    @classmethod\n    def _get_base_or_raise(cls, mod: ModelOnDisk) -> BaseModelType:\n        config_dict = get_config_dict_or_raise(common_config_paths(mod.path))\n\n        adapter_type = config_dict.get(\"adapter_type\")\n\n        match adapter_type:\n            case \"full_adapter_xl\":\n                return BaseModelType.StableDiffusionXL\n            case \"full_adapter\" | \"light_adapter\":\n                return BaseModelType.StableDiffusion1\n            case _:\n                raise NotAMatchError(f\"unrecognized adapter_type '{adapter_type}'\")\n\n\nclass T2IAdapter_Diffusers_SD1_Config(T2IAdapter_Diffusers_Config_Base, Config_Base):\n    base: Literal[BaseModelType.StableDiffusion1] = Field(default=BaseModelType.StableDiffusion1)\n\n\nclass T2IAdapter_Diffusers_SDXL_Config(T2IAdapter_Diffusers_Config_Base, Config_Base):\n    base: Literal[BaseModelType.StableDiffusionXL] = Field(default=BaseModelType.StableDiffusionXL)\n","sourceCodeStart":53,"sourceCodeEnd":80,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/backend/model_manager/configs/t2i_adapter.py#L53-L80","documentation":"`NotAMatchError` from `T2IAdapterDiffusersConfig._get_base_or_raise`: the adapter's `config.json` contains an `adapter_type` value outside the recognized set (`full_adapter_xl`, `full_adapter`, `light_adapter`), so no base model can be determined. The message echoes the offending value; note it is also raised when `adapter_type` is absent (formats as `unrecognized adapter_type 'None'`).","triggerScenarios":"`from_model_on_disk` on a folder whose `common_config_paths(mod.path)` config.json has `adapter_type` set to a typo, a new/invented value, a renamed variant, or missing entirely — for example `fulladapter`, `light_adapter_xl`, or no adapter_type key.","commonSituations":"Custom adapter conversions that write novel adapter_type strings, upstream diffusers adding new adapter types before InvokeAI supports them, hand-edited config.json, checkpoints missing config.json keys after partial copy.","solutions":["Open the adapter's config.json and set `adapter_type` to one of: `full_adapter_xl`, `full_adapter`, `light_adapter`","If `adapter_type` is missing, add it based on the actual architecture (XL adapters → full_adapter_xl; SD1 → full_adapter or light_adapter)","If the adapter uses a genuinely new type from upstream diffusers, update InvokeAI (or file an issue) to add the new match arm","Verify the right config file is present — a foreign config.json (e.g. from a non-adapter model) can lack adapter_type"],"exampleFix":"// before: config.json\n{\"adapter_type\": \"fulladapter_xl\"}\n// after\n{\"adapter_type\": \"full_adapter_xl\"}","handlingStrategy":"validation","validationCode":"import json\nfrom pathlib import Path\n\nVALID = {\"full_adapter_xl\", \"full_adapter\", \"light_adapter\"}\n\ndef adapter_type_is_valid(model_dir: Path) -> bool:\n    cfg_file = next(model_dir.glob(\"**/config.json\"), None)\n    if not cfg_file:\n        return False\n    return json.loads(cfg_file.read_text()).get(\"adapter_type\") in VALID","typeGuard":null,"tryCatchPattern":"try:\n    cfg = T2IAdapter_Diffusers_SD1_Config.from_model_on_disk(mod, override_fields)\nexcept NotAMatchError as e:\n    if \"unrecognized adapter_type\" in str(e):\n        print(\"Fix adapter_type in the adapter's config.json\")\n    raise","preventionTips":["Validate config.json keys after conversion: adapter_type must be one of full_adapter_xl|full_adapter|light_adapter","Never omit adapter_type when hand-writing adapter configs","Update InvokeAI when upstream diffusers introduces new adapter types"],"tags":["t2i-adapter","config","adapter-type"],"backgroundTag":"invalid-config-value","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}