{"record":{"id":"135ce34ec426473c","repo":"invoke-ai/InvokeAI","slug":"unsupported-batch-group-id-batch-group-id-in-c","errorCode":null,"errorMessage":"Unsupported batch group id '{batch_group_id}' in called workflow","messagePattern":"Unsupported batch group id '(.+?)' in called workflow","errorType":"exception","errorClass":"UnsupportedWorkflowNodeError","httpStatus":null,"severity":"error","filePath":"invokeai/app/services/session_processor/workflow_call_batch.py","lineNumber":205,"sourceCode":"        )\n        raise UnsupportedWorkflowNodeError(\n            \"call_saved_workflow does not yet support child workflows that mix supported batch nodes with \"\n            f\"unrelated generator nodes: {unsupported_nodes}\"\n        )\n\n\ndef _get_batch_group_id(node_data: Mapping[str, Any]) -> str:\n    inputs = node_data.get(\"inputs\")\n    if not _is_mapping(inputs):\n        return \"None\"\n    batch_group_input = inputs.get(\"batch_group_id\")\n    if not _is_mapping(batch_group_input):\n        return \"None\"\n    batch_group_id = batch_group_input.get(\"value\")\n    if not isinstance(batch_group_id, str):\n        return \"None\"\n    if batch_group_id not in SUPPORTED_BATCH_GROUP_IDS:\n        raise UnsupportedWorkflowNodeError(f\"Unsupported batch group id '{batch_group_id}' in called workflow\")\n    return batch_group_id\n\n\ndef _get_batch_items(node_data: Mapping[str, Any], field_name: str) -> list[Any]:\n    inputs = node_data.get(\"inputs\")\n    if not _is_mapping(inputs):\n        raise UnsupportedWorkflowNodeError(\"call_saved_workflow batch child workflow node inputs are malformed\")\n    batch_input = inputs.get(field_name)\n    if not _is_mapping(batch_input):\n        raise UnsupportedWorkflowNodeError(\n            f\"call_saved_workflow batch child workflow node is missing required '{field_name}' input\"\n        )\n    batch_items = batch_input.get(\"value\")\n    if not isinstance(batch_items, list):\n        raise UnsupportedWorkflowNodeError(\n            f\"call_saved_workflow batch child workflow node '{node_data.get('id')}' must provide a direct list for '{field_name}'\"\n        )\n    return batch_items","sourceCodeStart":187,"sourceCodeEnd":223,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/app/services/session_processor/workflow_call_batch.py#L187-L223","documentation":"A batch node in a called child workflow declares a batch_group_id input whose value is not one of the identifiers InvokeAI supports when expanding batch child workflows ('None', 'Group 1'..'Group 5'). The grouper only knows how to co-schedule batches declared with these fixed group ids; anything else is rejected by _get_batch_group_id.","triggerScenarios":"Calling a saved workflow whose batch node's batch_group_id input value is a custom string (e.g. typed name, UUID, or a group created in a newer UI version) instead of 'None' or 'Group 1'-'Group 5'.","commonSituations":"Hand-editing workflow JSON and setting an arbitrary group id; workflows saved by a newer frontend version that allows more/custom group names; copy-pasting group ids between workflows.","solutions":["Change the batch node's batch_group_id to one of the supported values: 'None' or 'Group 1' through 'Group 5'","Remove the batch_group_id input entirely (it defaults to 'None')","Re-export the workflow from a compatible InvokeAI version and re-save","Upgrade InvokeAI if a newer release widened SUPPORTED_BATCH_GROUP_IDS"],"exampleFix":"// before\n\"batch_group_id\": { \"value\": \"my-custom-group\" }\n// after\n\"batch_group_id\": { \"value\": \"Group 1\" }","handlingStrategy":"validation","validationCode":"SUPPORTED_BATCH_GROUP_IDS = {\"None\", *{f\"Group {i}\" for i in range(1, 6)}}\nfor node in workflow.get(\"nodes\", []):\n    data = node.get(\"data\", {}) if isinstance(node, dict) else {}\n    gi = data.get(\"inputs\", {}).get(\"batch_group_id\")\n    v = gi.get(\"value\") if isinstance(gi, dict) else None\n    if isinstance(v, str) and v not in SUPPORTED_BATCH_GROUP_IDS:\n        raise ValueError(f\"batch_group_id '{v}' not supported in called workflow\")","typeGuard":"def is_supported_batch_group_id(v: object) -> bool:\n    return isinstance(v, str) and v in {\"None\", \"Group 1\", \"Group 2\", \"Group 3\", \"Group 4\", \"Group 5\"}","tryCatchPattern":"try:\n    sessions = build_batch_child_workflow_sessions(...)\nexcept UnsupportedWorkflowNodeError as e:\n    m = re.search(r\"Unsupported batch group id '(.+?)'\", str(e))\n    if m:\n        workflow = rewrite_batch_group_ids(workflow, default=\"None\")\n        sessions = build_batch_child_workflow_sessions(...)\n    else:\n        raise","preventionTips":["Only use 'None' or 'Group 1'-'Group 5' as batch_group_id in workflows intended for call_saved_workflow","Validate workflow JSON against supported group ids before submitting","Avoid hand-editing batch_group_id values","Pin workflow exports to the same InvokeAI version as the server"],"tags":["workflow","batch","validation","invokeai"],"backgroundTag":"unsupported-enum-value","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}