invoke-ai/InvokeAI · warning · NotAMatchError
base is {recognized_base}, not {expected_base}
Error message
base is {recognized_base}, not {expected_base} What it means
`NotAMatchError` from `T2IAdapterDiffusersConfig._validate_base`: the adapter's `adapter_type` (read from its diffusers config.json) resolved to a base model that does not match the `base` literal declared by this specific config class. It is part of normal probing — each SD1/SDXL config class validates the resolved base and declines non-matching adapters so the right class (e.g. `T2IAdapter_Diffusers_SD1_Config` vs the XL variant) picks the model up.
Source
Thrown at invokeai/backend/model_manager/configs/t2i_adapter.py:57
raise_for_class_name(
common_config_paths(mod.path),
{
"T2IAdapter",
},
)
cls._validate_base(mod)
return cls(**override_fields)
@classmethod
def _validate_base(cls, mod: ModelOnDisk) -> None:
"""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)View on GitHub (pinned to 0b6a024f2f)
Solutions
- No action needed during auto-import — the matching base's config class will accept the model
- If you forced a specific config class, switch to the one whose `base` matches `adapter_type` (`full_adapter`/`light_adapter` → SD1, `full_adapter_xl` → SDXL)
- Fix a wrong `adapter_type` in the adapter's config.json if the checkpoint was mislabeled during conversion
Example fix
// before: registering full_adapter_xl with T2IAdapter_Diffusers_SD1_Config // after: use the SDXL config class (base=StableDiffusionXL) or fix config.json adapter_type
Defensive patterns
Strategy: validation
Validate before calling
import json
from pathlib import Path
def adapter_base(model_dir: Path) -> str | None:
cfg = json.loads(next(model_dir.glob("**/config.json")).read_text())
t = cfg.get("adapter_type")
return {"full_adapter_xl": "sdxl", "full_adapter": "sd1", "light_adapter": "sd1"}.get(t) Try / catch
try:
cfg = T2IAdapter_Diffusers_SD1_Config.from_model_on_disk(mod, override_fields)
except NotAMatchError as e:
if str(e).startswith("base is"):
print("Adapter belongs to a different base — let the prober pick the right class")
raise Prevention
- Prefer auto-detection over forcing an explicit config class
- Keep adapter_type in config.json consistent with the checkpoint's true base
- Group SD1 and SDXL adapters in separate import folders to reduce confusion
When it happens
Trigger: `from_model_on_disk` on a diffusers T2I-Adapter folder whose `config.json` `adapter_type` maps to a different `BaseModelType` than the class being probed (e.g. `full_adapter_xl` probed by the SD1 config class).
Common situations: Auto-import scanning where the SD1 class sees an XL adapter (expected; the XL class will match instead), manually registering a model with an explicit config class that disagrees with `adapter_type`, adapters converted with a mismatched `adapter_type` field.
Related errors
- Unexpected T2I-Adapter base model type: '{model_config.base}
- Unexpected T2I-Adapter base model type: '${t2i_adapter_model
- model does not look like an Anima LoRA
- base is {recognized_base}, not {expected_base}
- model does not match SpandrelImageToImage heuristics
AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29).
Data as JSON: /api/errors/c76094afe07c0c75.
Report an issue: GitHub.