invoke-ai/InvokeAI · error · UnsupportedWorkflowNodeError

call_saved_workflow batch child workflow node '{node_id}' mu

Error message

call_saved_workflow batch child workflow node '{node_id}' must provide at least one batch item

What it means

A supported batch node in the called saved workflow has no generator wiring and its own batch field holds no items. InvokeAI cannot expand the batch node into child executions and raises UnsupportedWorkflowNodeError requiring at least one batch item.

Source

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

            generator_node_type = generator_node["data"].get("type") if _is_invocation_node(generator_node) else None
            if generator_node_type == "image_generator" and services is None and resolve_generator_items:
                raise UnsupportedWorkflowNodeError(
                    "call_saved_workflow image-generator-backed batch child workflows require runtime services"
                )
            batch_items = (
                _resolve_generator_items(generator_node, services, user_id, maximum_children)
                if resolve_generator_items
                else _get_generator_placeholder_items(generator_node)
            )
            used_generator_node_ids.add(generator_source_id)
            if not batch_items:
                raise UnsupportedWorkflowNodeError(
                    f"call_saved_workflow generator-backed batch child workflow node '{generator_source_id}' produced no batch items"
                )
        else:
            batch_items = _get_batch_items(node_data, field_name)
            if not batch_items:
                raise UnsupportedWorkflowNodeError(
                    f"call_saved_workflow batch child workflow node '{node_id}' must provide at least one batch item"
                )
        batch_group_id = _get_batch_group_id(node_data)
        destinations = _resolve_batch_destinations(node_id, field_name, workflow_nodes, workflow_edges)
        if not destinations:
            raise UnsupportedWorkflowNodeError(
                f"call_saved_workflow batch child workflow node '{node_id}' is not connected to any invocation input"
            )
        group_batch_data = batch_data_by_group.setdefault(batch_group_id, [])
        for destination_node_id, destination_field in destinations:
            group_batch_data.append(
                BatchDatum(
                    node_path=destination_node_id,
                    field_name=destination_field,
                    items=_normalize_batch_item_for_destination(destination_field, batch_items),
                )
            )

View on GitHub (pinned to 0b6a024f2f)

Solutions

  1. Open the saved workflow and populate the batch node's collection field with at least one item.
  2. Wire a generator node (range, rand int, collection, image collection) into the batch node's input instead of leaving it standalone.
  3. Validate the workflow before enqueueing: walk nodes of supported batch types and assert the collection field is non-empty.
  4. Re-save the workflow from the editor so the batch items persist in the workflow record.

Example fix

// before
{"id":"batch1","data":{"type":"batch","collection":[]}}
// after
{"id":"batch1","data":{"type":"batch","collection":["img_a","img_b"]}}
Defensive patterns

Strategy: validation

Validate before calling

def batch_nodes_have_items(workflow, supported_types, field_names):
    for n in workflow.get("nodes", []):
        t = n.get("data", {}).get("type")
        if t in supported_types:
            if not n["data"].get(field_names[t]):
                return False
    return True

Type guard

def has_batch_items(node, field) -> bool:
    items = node.get("data", {}).get(field)
    return isinstance(items, (list, dict)) and len(items) > 0

Try / catch

try:
    results = build_batch_child_workflow_session_results(...)
except UnsupportedWorkflowNodeError as e:
    if "must provide at least one batch item" in str(e):
        raise WorkflowConfigError(node_id=extract_node_id(str(e))) from e

Prevention

When it happens

Trigger: build_batch_child_workflow_session_results finds a node of a SUPPORTED_BATCH_TYPES type whose BATCH_FIELD_NAMES field (the collection field on node data) is empty or missing, and _resolve_batch_items_from_inputs found no connected generator.

Common situations: Editing a saved workflow and clearing the batch collection list; duplicating a batch node without copying its items; creating a batch node in the UI but forgetting to add entries; workflow JSON hand-edited and the collection field dropped.

Related errors


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