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
- Use a T2I-Adapter trained for the base model in use (SD1 adapters with SD1, SDXL adapters with SDXL).
- Avoid T2I-Adapter on unsupported bases (SD2/SD3/Flux) or add a mapping for that base in t2i_adapter.py.
- Check the adapter's registered BaseModelType in the model manager and correct it if mislabeled.
- 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
- Match T2I-Adapter checkpoints to the UNet base model
- Check BaseModelType before adding adapter nodes
- Avoid T2I-Adapters on SD2/SD3/Flux workflows
- Correct mislabeled adapter registrations in the model manager
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
- Unexpected T2I-Adapter base model type: '${t2i_adapter_model
- Invalid mode selected
- Unexpected control_input type: ${type(control_input)}
- 'latents' or 'noise' must be provided!
- Incompatible 'noise' and 'latents' shapes: ${latents.shape=}
AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29).
Data as JSON: /api/errors/d4c83719d6540dc3.
Report an issue: GitHub.