invoke-ai/InvokeAI · error · ValueError

Unexpected T2I-Adapter base model type: '{model_config.base}

Error message

Unexpected T2I-Adapter base model type: '{model_config.base}'.

What it means

T2IAdapterExtension computes a max UNet downscale factor based on the adapter model's base model type, and only StableDiffusion1 (÷8) and StableDiffusionXL (÷4) are handled. Any other BaseModelType falls through to ValueError in __init__.

Source

Thrown at invokeai/backend/stable_diffusion/extensions/t2i_adapter.py:54

        super().__init__()
        self._node_context = node_context
        self._model_id = model_id
        self._image = image
        self._weight = weight
        self._resize_mode = resize_mode
        self._begin_step_percent = begin_step_percent
        self._end_step_percent = end_step_percent

        self._adapter_state: Optional[List[torch.Tensor]] = None

        # The max_unet_downscale is the maximum amount that the UNet model downscales the latent image internally.
        model_config = self._node_context.models.get_config(self._model_id.key)
        if model_config.base == BaseModelType.StableDiffusion1:
            self._max_unet_downscale = 8
        elif model_config.base == BaseModelType.StableDiffusionXL:
            self._max_unet_downscale = 4
        else:
            raise ValueError(f"Unexpected T2I-Adapter base model type: '{model_config.base}'.")

    @callback(ExtensionCallbackType.SETUP)
    def setup(self, ctx: DenoiseContext):
        t2i_model: T2IAdapter
        with self._node_context.models.load(self._model_id) as t2i_model:
            _, _, latents_height, latents_width = ctx.inputs.orig_latents.shape

            self._adapter_state = self._run_model(
                model=t2i_model,
                image=self._image,
                latents_height=latents_height,
                latents_width=latents_width,
            )

    def _run_model(
        self,
        model: T2IAdapter,
        image: Image,

View on GitHub (pinned to 0b6a024f2f)

Solutions

  1. Use a T2I-Adapter trained for the base model in use (SD1 adapters with SD1, SDXL adapters with SDXL).
  2. Avoid T2I-Adapter on unsupported bases (SD2/SD3/Flux) or add a mapping for that base in t2i_adapter.py.
  3. Check the adapter's registered BaseModelType in the model manager and correct it if mislabeled.
  4. Downgrade/switch the workflow's base model to SD1 or SDXL when using T2I-Adapters.

Example fix

// before
t2i_node(model=sd2_t2i_adapter)  # base = StableDiffusion2
// after
t2i_node(model=sd1_t2i_adapter)  # base must be SD1 or SDXL
Defensive patterns

Strategy: validation

Validate before calling

cfg = models.get_config(t2i_model_id.key)
if cfg.base not in (BaseModelType.StableDiffusion1, BaseModelType.StableDiffusionXL):
    raise ValueError(f"T2I-Adapter unsupported for base {cfg.base}")

Type guard

def t2i_adapter_supported(cfg) -> bool:
    return cfg.base in (BaseModelType.StableDiffusion1, BaseModelType.StableDiffusionXL)

Try / catch

try:
    ext = T2IAdapterExtension(model_id=t2i_id, ...)
except ValueError as e:
    if "Unexpected T2I-Adapter base model type" in str(e):
        log.warning("T2I-Adapter skipped: %s", e)
        ext = None
    else:
        raise

Prevention

When it happens

Trigger: Building a T2I-Adapter extension whose model_config.base is neither StableDiffusion1 nor StableDiffusionXL — e.g. a StableDiffusion2, SD3, or Flux base — via the extension's __init__.

Common situations: Attaching a T2I-Adapter in an SD2/SD3/other-base workflow; adapter model registered under the wrong base type in the model manager; copying an SDXL T2I-Adapter node into an SD1/SD2 graph without changing the model.

Related errors


AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29). Data as JSON: /api/errors/d4c83719d6540dc3. Report an issue: GitHub.