{"record":{"id":"962155d0db59cc98","repo":"invoke-ai/InvokeAI","slug":"call-saved-workflow-batch-child-workflow-node-is-m","errorCode":null,"errorMessage":"call_saved_workflow batch child workflow node is missing required '{field_name}' input","messagePattern":"call_saved_workflow batch child workflow node is missing required '(.+?)' input","errorType":"exception","errorClass":"UnsupportedWorkflowNodeError","httpStatus":null,"severity":"error","filePath":"invokeai/app/services/session_processor/workflow_call_batch.py","lineNumber":215,"sourceCode":"        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\n\n\ndef _parse_split_values(input_value: str, split_on: str) -> list[str]:\n    if split_on == \"\":\n        return [input_value]\n    try:\n        return input_value.split(json.loads(f'\"{split_on}\"'))\n    except Exception:\n        return input_value.split(split_on)\n","sourceCodeStart":197,"sourceCodeEnd":233,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/app/services/session_processor/workflow_call_batch.py#L197-L233","documentation":"The batch node has a valid inputs mapping but lacks the required field input for its type (image_batch→'images', string_batch→'strings', integer_batch→'integers', float_batch→'floats'). Since no generator node feeds this input, InvokeAI falls back to reading the direct value and finds it absent, so it raises UnsupportedWorkflowNodeError from _get_batch_items.","triggerScenarios":"Calling a saved workflow where a batch node (not generator-fed) is missing its matching field in data.inputs — e.g. a string_batch node whose inputs dict has no 'strings' key.","commonSituations":"Renaming fields in hand-edited JSON; partially deleted inputs after canvas edits; workflows exported from versions where field names differed; building workflow JSON programmatically and forgetting the field.","solutions":["Add the required input key ('images'/'strings'/'integers'/'floats') to the batch node's data.inputs with a mapping value","Wire a generator node (e.g. string_generator) into the batch field input so the value comes from the generator path instead","Re-export the workflow from the InvokeAI canvas to regenerate correct inputs","Verify BATCH_FIELD_NAMES mapping in workflow_call_batch.py matches the node types you are using"],"exampleFix":"// before: integer_batch node with inputs { \"collection\": ... } but no \"integers\"\n// after\n\"inputs\": { \"integers\": { \"value\": [1, 2, 3] } }","handlingStrategy":"validation","validationCode":"BATCH_FIELD_NAMES = {\"image_batch\": \"images\", \"string_batch\": \"strings\", \"integer_batch\": \"integers\", \"float_batch\": \"floats\"}\nfor node in workflow.get(\"nodes\", []):\n    d = node.get(\"data\", {}) if isinstance(node, dict) else {}\n    field = BATCH_FIELD_NAMES.get(d.get(\"type\"))\n    if field and not isinstance(d.get(\"inputs\", {}).get(field), dict):\n        raise ValueError(f\"batch node {d.get('id')} missing required input '{field}'\")","typeGuard":"def batch_field_present(node: dict, field: str) -> bool:\n    inputs = node.get(\"data\", {}).get(\"inputs\")\n    return isinstance(inputs, dict) and isinstance(inputs.get(field), dict)","tryCatchPattern":"try:\n    sessions = build_batch_child_workflow_sessions(...)\nexcept UnsupportedWorkflowNodeError as e:\n    m = re.search(r\"missing required '(\\w+)' input\", str(e))\n    if m:\n        workflow = add_missing_batch_field(workflow, m.group(1))  # inject default list\n        sessions = build_batch_child_workflow_sessions(...)\n    else:\n        raise","preventionTips":["Always include the matching field key (images/strings/integers/floats) in each batch node's inputs","Wire generators to batch inputs rather than deleting the direct value path","Re-export workflows after structural canvas edits","Add workflow JSON linting to your CI when generating workflows programmatically"],"tags":["workflow","batch","missing-input","invokeai"],"backgroundTag":"missing-required-field","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}