invoke-ai/InvokeAI · error · UnsupportedWorkflowNodeError

call_saved_workflow batch child workflow node is missing req

Error message

call_saved_workflow batch child workflow node is missing required '{field_name}' input

What it means

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.

Source

Thrown at invokeai/app/services/session_processor/workflow_call_batch.py:215

        return "None"
    batch_group_input = inputs.get("batch_group_id")
    if not _is_mapping(batch_group_input):
        return "None"
    batch_group_id = batch_group_input.get("value")
    if not isinstance(batch_group_id, str):
        return "None"
    if batch_group_id not in SUPPORTED_BATCH_GROUP_IDS:
        raise UnsupportedWorkflowNodeError(f"Unsupported batch group id '{batch_group_id}' in called workflow")
    return batch_group_id


def _get_batch_items(node_data: Mapping[str, Any], field_name: str) -> list[Any]:
    inputs = node_data.get("inputs")
    if not _is_mapping(inputs):
        raise UnsupportedWorkflowNodeError("call_saved_workflow batch child workflow node inputs are malformed")
    batch_input = inputs.get(field_name)
    if not _is_mapping(batch_input):
        raise UnsupportedWorkflowNodeError(
            f"call_saved_workflow batch child workflow node is missing required '{field_name}' input"
        )
    batch_items = batch_input.get("value")
    if not isinstance(batch_items, list):
        raise UnsupportedWorkflowNodeError(
            f"call_saved_workflow batch child workflow node '{node_data.get('id')}' must provide a direct list for '{field_name}'"
        )
    return batch_items


def _parse_split_values(input_value: str, split_on: str) -> list[str]:
    if split_on == "":
        return [input_value]
    try:
        return input_value.split(json.loads(f'"{split_on}"'))
    except Exception:
        return input_value.split(split_on)

View on GitHub (pinned to 0b6a024f2f)

Solutions

  1. Add the required input key ('images'/'strings'/'integers'/'floats') to the batch node's data.inputs with a mapping value
  2. Wire a generator node (e.g. string_generator) into the batch field input so the value comes from the generator path instead
  3. Re-export the workflow from the InvokeAI canvas to regenerate correct inputs
  4. Verify BATCH_FIELD_NAMES mapping in workflow_call_batch.py matches the node types you are using

Example fix

// before: integer_batch node with inputs { "collection": ... } but no "integers"
// after
"inputs": { "integers": { "value": [1, 2, 3] } }
Defensive patterns

Strategy: validation

Validate before calling

BATCH_FIELD_NAMES = {"image_batch": "images", "string_batch": "strings", "integer_batch": "integers", "float_batch": "floats"}
for node in workflow.get("nodes", []):
    d = node.get("data", {}) if isinstance(node, dict) else {}
    field = BATCH_FIELD_NAMES.get(d.get("type"))
    if field and not isinstance(d.get("inputs", {}).get(field), dict):
        raise ValueError(f"batch node {d.get('id')} missing required input '{field}'")

Type guard

def batch_field_present(node: dict, field: str) -> bool:
    inputs = node.get("data", {}).get("inputs")
    return isinstance(inputs, dict) and isinstance(inputs.get(field), dict)

Try / catch

try:
    sessions = build_batch_child_workflow_sessions(...)
except UnsupportedWorkflowNodeError as e:
    m = re.search(r"missing required '(\w+)' input", str(e))
    if m:
        workflow = add_missing_batch_field(workflow, m.group(1))  # inject default list
        sessions = build_batch_child_workflow_sessions(...)
    else:
        raise

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: "Missing required field" and "field is required" errors: why libraries reject payloads that omit mandatory fields — this error's family across 20 libraries.

Related errors


AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29). Data as JSON: /api/errors/962155d0db59cc98. Report an issue: GitHub.