invoke-ai/InvokeAI · error · NotAMatchError
unrecognized adapter_type '{adapter_type}'
Error message
unrecognized adapter_type '{adapter_type}' What it means
`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'`).
Source
Thrown at invokeai/backend/model_manager/configs/t2i_adapter.py:71
"""Raise `NotAMatch` if the model base does not match this config class."""
expected_base = cls.model_fields["base"].default
recognized_base = cls._get_base_or_raise(mod)
if expected_base is not recognized_base:
raise NotAMatchError(f"base is {recognized_base}, not {expected_base}")
@classmethod
def _get_base_or_raise(cls, mod: ModelOnDisk) -> BaseModelType:
config_dict = get_config_dict_or_raise(common_config_paths(mod.path))
adapter_type = config_dict.get("adapter_type")
match adapter_type:
case "full_adapter_xl":
return BaseModelType.StableDiffusionXL
case "full_adapter" | "light_adapter":
return BaseModelType.StableDiffusion1
case _:
raise NotAMatchError(f"unrecognized adapter_type '{adapter_type}'")
class T2IAdapter_Diffusers_SD1_Config(T2IAdapter_Diffusers_Config_Base, Config_Base):
base: Literal[BaseModelType.StableDiffusion1] = Field(default=BaseModelType.StableDiffusion1)
class T2IAdapter_Diffusers_SDXL_Config(T2IAdapter_Diffusers_Config_Base, Config_Base):
base: Literal[BaseModelType.StableDiffusionXL] = Field(default=BaseModelType.StableDiffusionXL)
View on GitHub (pinned to 0b6a024f2f)
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
Example fix
// before: config.json
{"adapter_type": "fulladapter_xl"}
// after
{"adapter_type": "full_adapter_xl"} Defensive patterns
Strategy: validation
Validate before calling
import json
from pathlib import Path
VALID = {"full_adapter_xl", "full_adapter", "light_adapter"}
def adapter_type_is_valid(model_dir: Path) -> bool:
cfg_file = next(model_dir.glob("**/config.json"), None)
if not cfg_file:
return False
return json.loads(cfg_file.read_text()).get("adapter_type") in VALID Try / catch
try:
cfg = T2IAdapter_Diffusers_SD1_Config.from_model_on_disk(mod, override_fields)
except NotAMatchError as e:
if "unrecognized adapter_type" in str(e):
print("Fix adapter_type in the adapter's config.json")
raise Prevention
- 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
When it happens
Trigger: `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.
Common situations: 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.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- str(e)
- Multiuser mode is disabled. Authentication is not required i
- Multiuser mode is disabled. Admin setup is not required in s
- Unexpected T2I-Adapter base model type: '${t2i_adapter_model
- Invalid regex: {e}
AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29).
Data as JSON: /api/errors/80a5efa32f69fb8c.
Report an issue: GitHub.