{"record":{"id":"50ca35f1ad397788","repo":"invoke-ai/InvokeAI","slug":"unsupported-blend-mode-self-blend-mode","errorCode":null,"errorMessage":"Unsupported blend mode: '{self.blend_mode}'.","messagePattern":"Unsupported blend mode: '(.+?)'\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"invokeai/app/invocations/tiles.py","lineNumber":278,"sourceCode":"            pil_image = context.images.get_pil(image.image_name)\n            pil_image = pil_image.convert(\"RGB\")\n            tile_np_images.append(np.array(pil_image))\n\n        # Prepare the output image buffer.\n        # Check the first tile to determine how many image channels are expected in the output.\n        channels = tile_np_images[0].shape[-1]\n        dtype = tile_np_images[0].dtype\n        np_image = np.zeros(shape=(height, width, channels), dtype=dtype)\n        if self.blend_mode == \"Linear\":\n            merge_tiles_with_linear_blending(\n                dst_image=np_image, tiles=tiles, tile_images=tile_np_images, blend_amount=self.blend_amount\n            )\n        elif self.blend_mode == \"Seam\":\n            merge_tiles_with_seam_blending(\n                dst_image=np_image, tiles=tiles, tile_images=tile_np_images, blend_amount=self.blend_amount\n            )\n        else:\n            raise ValueError(f\"Unsupported blend mode: '{self.blend_mode}'.\")\n\n        # Convert into a PIL image and save\n        pil_image = Image.fromarray(np_image)\n\n        image_dto = context.images.save(image=pil_image)\n        return ImageOutput.build(image_dto)\n","sourceCodeStart":260,"sourceCodeEnd":285,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/app/invocations/tiles.py#L260-L285","documentation":"The ImageToTiles / blend tiles invocation only supports a fixed set of blend modes (e.g. Linear and Seam). Any other value for self.blend_mode reaches an else branch that raises ValueError. The mode string must match one of the supported enum members exactly.","triggerScenarios":"Setting blend_mode to an unsupported string like 'seam', 'linear' (wrong case), 'smooth', or a free-text value instead of one of the enumerated supported modes when invoking the tiles invocation.","commonSituations":"Old workflow JSON from a previous InvokeAI version whose blend mode enum value was renamed; hand-editing a workflow file with a typo; case mismatch ('seam' vs 'Seam').","solutions":["Set blend_mode to a supported value exactly (e.g. 'Linear' or 'Seam' as defined by the invocation's enum)","Update stale workflow JSON to the current enum values","Validate the field against the BlendMode enum before invoking"],"exampleFix":"// before\nblend_mode=\"seam\"\n// after\nblend_mode=\"Seam\"","handlingStrategy":"validation","validationCode":"SUPPORTED_BLEND_MODES = {\"Linear\", \"Seam\"}\nif blend_mode not in SUPPORTED_BLEND_MODES:\n    raise ValueError(f\"blend_mode must be one of {sorted(SUPPORTED_BLEND_MODES)}, got {blend_mode!r}\")","typeGuard":"def is_supported_blend_mode(mode: str) -> bool:\n    return mode in {\"Linear\", \"Seam\"}","tryCatchPattern":"try:\n    output = invocation.invoke(context)\nexcept ValueError as e:\n    if str(e).startswith(\"Unsupported blend mode\"):\n        invocation.blend_mode = \"Linear\"  # safe default\n        output = invocation.invoke(context)\n    else:\n        raise","preventionTips":["Only assign blend_mode from the invocation's enum field, never free text","Re-validate workflow JSON after upgrading InvokeAI (enum values can change)","Match exact capitalization ('Seam', not 'seam')"],"tags":["validation","invokeai","enum"],"backgroundTag":"invalid-enum-value","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}