{"record":{"id":"3cb7d7b75df16d15","repo":"invoke-ai/InvokeAI","slug":"unexpected-ip-adapter-method-self-method","errorCode":null,"errorMessage":"Unexpected IP-Adapter method: '{self.method}'.","messagePattern":"Unexpected IP-Adapter method: '(.+?)'\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"invokeai/app/invocations/ip_adapter.py","lineNumber":187,"sourceCode":"                    \"up_blocks.2.attentions.2\",\n                    \"up_blocks.0.attentions.0\",\n                    \"up_blocks.1.attentions.0\",\n                    \"up_blocks.2.attentions.0\",\n                    \"down_blocks.0.attentions.0\",\n                    \"down_blocks.0.attentions.1\",\n                    \"down_blocks.0.attentions.2\",\n                    \"down_blocks.1.attentions.0\",\n                    \"down_blocks.1.attentions.1\",\n                    \"down_blocks.1.attentions.2\",\n                    \"down_blocks.2.attentions.0\",\n                    \"down_blocks.2.attentions.2\",\n                ]\n            else:\n                raise ValueError(f\"Unsupported IP-Adapter base type: '{ip_adapter_info.base}'.\")\n        elif self.method == \"full\":\n            target_blocks = [\"block\"]\n        else:\n            raise ValueError(f\"Unexpected IP-Adapter method: '{self.method}'.\")\n\n        return IPAdapterOutput(\n            ip_adapter=IPAdapterField(\n                image=self.image,\n                ip_adapter_model=self.ip_adapter_model,\n                image_encoder_model=ModelIdentifierField.from_config(image_encoder_model),\n                weight=self.weight,\n                target_blocks=target_blocks,\n                begin_step_percent=self.begin_step_percent,\n                end_step_percent=self.end_step_percent,\n                mask=self.mask,\n                method=self.method,\n            ),\n        )\n\n    @classmethod\n    def get_clip_image_encoder(\n        cls, context: InvocationContext, image_encoder_model_id: str, image_encoder_model_name: str","sourceCodeStart":169,"sourceCodeEnd":205,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/app/invocations/ip_adapter.py#L169-L205","documentation":"Final fallback in invoke(): after checking method against 'style', 'composition', 'style_precise', 'style_strong', and 'full', any other value raises 'Unexpected IP-Adapter method'. The input field is typed Literal[\"full\", \"style\", \"composition\", \"style_strong\", \"style_precise\"], so this normally only fires when a stale/invalid workflow graph bypasses pydantic validation (e.g. an old serialized workflow or hand-edited graph with an obsolete method string).","triggerScenarios":"Submitting a workflow graph whose ip_adapter node has method set to a value outside the five allowed literals — typically a graph saved by an older InvokeAI version before a rename/removal, or a hand-edited/programmatically-built graph that skips validation.","commonSituations":"Loading an old workflow file after an InvokeAI upgrade changed the method enum; scripting graph JSON by hand with a typo like 'styles' or 'precise'; third-party tooling generating graphs with invalid method values.","solutions":["Open the workflow in the editor and set the IP-Adapter node's method to one of: full, style, composition, style_strong, style_precise.","Fix the method string in the workflow JSON (grep for the ip_adapter node's 'method' key).","Upgrade/re-save the workflow with the current InvokeAI version so serialized fields are migrated and re-validated."],"exampleFix":"// before (workflow JSON)\n\"method\": \"precise\"\n// after\n\"method\": \"style_precise\"","handlingStrategy":"validation","validationCode":"ALLOWED = {\"full\", \"style\", \"composition\", \"style_strong\", \"style_precise\"}\nif node.get(\"method\") not in ALLOWED:\n    raise ValueError(f\"Invalid IP-Adapter method {node.get('method')!r}; expected one of {sorted(ALLOWED)}\")","typeGuard":"from typing import Literal, get_args\nMethod = Literal[\"full\", \"style\", \"composition\", \"style_strong\", \"style_precise\"]\ndef is_valid_method(v: object) -> bool:\n    return v in get_args(Method)","tryCatchPattern":"try:\n    out = invoke(node)\nexcept ValueError as e:\n    if \"Unexpected IP-Adapter method\" in str(e):\n        node.method = \"full\"\n        out = invoke(node)","preventionTips":["Re-save old workflows in the current InvokeAI version so enum fields are migrated.","Never hand-edit workflow JSON method fields without checking the Literal type.","Validate graph nodes against the current invocation schema before submission."],"tags":["ip-adapter","workflow","invokeai","invalid-enum-value"],"backgroundTag":"invalid-enum-value","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}