{"record":{"id":"7269de355db97c45","repo":"invoke-ai/InvokeAI","slug":"unsupported-ip-adapter-base-type-ip-adapter-inf","errorCode":null,"errorMessage":"Unsupported IP-Adapter base type: '{ip_adapter_info.base}'.","messagePattern":"Unsupported IP-Adapter base type: '(.+?)'\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"invokeai/app/invocations/ip_adapter.py","lineNumber":144,"sourceCode":"        assert isinstance(ip_adapter_info, (IPAdapter_InvokeAI_Config_Base, IPAdapter_Checkpoint_Config_Base))\n\n        if isinstance(ip_adapter_info, IPAdapter_InvokeAI_Config_Base):\n            image_encoder_model_id = ip_adapter_info.image_encoder_model_id\n            image_encoder_model_name = image_encoder_model_id.split(\"/\")[-1].strip()\n        else:\n            image_encoder_starter_model = CLIP_VISION_MODEL_MAP[self.clip_vision_model]\n            image_encoder_model_id = image_encoder_starter_model.source\n            image_encoder_model_name = image_encoder_starter_model.name\n\n        image_encoder_model = self.get_clip_image_encoder(context, image_encoder_model_id, image_encoder_model_name)\n\n        if self.method == \"style\":\n            if ip_adapter_info.base == \"sd-1\":\n                target_blocks = [\"up_blocks.1\"]\n            elif ip_adapter_info.base == \"sdxl\":\n                target_blocks = [\"up_blocks.0.attentions.1\"]\n            else:\n                raise ValueError(f\"Unsupported IP-Adapter base type: '{ip_adapter_info.base}'.\")\n        elif self.method == \"composition\":\n            if ip_adapter_info.base == \"sd-1\":\n                target_blocks = [\"down_blocks.2\", \"mid_block\"]\n            elif ip_adapter_info.base == \"sdxl\":\n                target_blocks = [\"down_blocks.2.attentions.1\"]\n            else:\n                raise ValueError(f\"Unsupported IP-Adapter base type: '{ip_adapter_info.base}'.\")\n        elif self.method == \"style_precise\":\n            if ip_adapter_info.base == \"sd-1\":\n                target_blocks = [\"up_blocks.1\", \"down_blocks.2\", \"mid_block\"]\n            elif ip_adapter_info.base == \"sdxl\":\n                target_blocks = [\"up_blocks.0.attentions.1\", \"down_blocks.2.attentions.1\"]\n            else:\n                raise ValueError(f\"Unsupported IP-Adapter base type: '{ip_adapter_info.base}'.\")\n        elif self.method == \"style_strong\":\n            if ip_adapter_info.base == \"sd-1\":\n                target_blocks = [\"up_blocks.0\", \"up_blocks.1\", \"up_blocks.2\", \"down_blocks.0\", \"down_blocks.1\"]\n            elif ip_adapter_info.base == \"sdxl\":","sourceCodeStart":126,"sourceCodeEnd":162,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/app/invocations/ip_adapter.py#L126-L162","documentation":"The IP-Adapter invocation throws this ValueError during invoke() when the selected method is 'style' but the IP-Adapter model's base model type (ip_adapter_info.base) is neither 'sd-1' nor 'sdxl'. The 'style' method works by targeting specific attention blocks of the underlying UNet, and InvokeAI only knows the correct block names for SD1.5 and SDXL architectures. Any other base (e.g. SD2, SDXL-Refiner, Flux) has different block naming, so the invocation refuses to proceed rather than silently targeting wrong blocks.","triggerScenarios":"Running an 'ip_adapter' invocation node with method='style' (via the workflow graph API or the canvas) whose ip_adapter_model points to an IP-Adapter model whose config's base is not BaseModelType.StableDiffusion1 ('sd-1') or StableDiffusionXL ('sdxl') — e.g. an SD2-based or mismatched IP-Adapter model.","commonSituations":"Selecting an IP-Adapter model that was imported with the wrong base model type in the model manager; using a workflow authored for SD1.5/SDXL with a model whose base was auto-detected incorrectly; feeding an IP-Adapter config for SD2 or another architecture into a style-method node.","solutions":["Use method='full' (or a method without base-specific block targeting) if your IP-Adapter base is not sd-1/sdxl.","Re-import or edit the IP-Adapter model in the Model Manager so its base model type is StableDiffusion1 or StableDiffusionXL, matching the actual model.","Swap the ip_adapter_model input to an IP-Adapter model that matches the checkpoint architecture being used (sd-1 for SD1.5, sdxl for SDXL)."],"exampleFix":"// before\nIPAdapterInvocation(image=..., ip_adapter_model=sd2_ip_adapter, method='style')\n// after\nIPAdapterInvocation(image=..., ip_adapter_model=sd1_ip_adapter, method='style')\n// or, for a non-sd-1/sdxl base:\nIPAdapterInvocation(image=..., ip_adapter_model=sd2_ip_adapter, method='full')","handlingStrategy":"validation","validationCode":"info = context.models.get_config(node.ip_adapter_model.key)\nassert info.base in (\"sd-1\", \"sdxl\"), f\"method='style' requires sd-1/sdxl, got {info.base}\"","typeGuard":"def is_style_capable(base: str) -> bool:\n    return base in (\"sd-1\", \"sdxl\")","tryCatchPattern":"try:\n    out = invoke(ip_adapter_node)\nexcept ValueError as e:\n    if \"Unsupported IP-Adapter base type\" in str(e):\n        node.method = \"full\"  # base-agnostic fallback\n        out = invoke(node)","preventionTips":["Verify the IP-Adapter model's base type in the Model Manager before using style/composition methods.","Keep the IP-Adapter model architecture matched to the checkpoint used by the denoise node.","Default to method='full' unless you know the base is sd-1 or sdxl."],"tags":["ip-adapter","model-config","invokeai","unsupported-model"],"backgroundTag":"unsupported-model-architecture","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}