invoke-ai/InvokeAI · error · UnsupportedWorkflowNodeError

Unsupported string generator type '{generator_type}'

Error message

Unsupported string generator type '{generator_type}'

What it means

A string_generator node in a called batch child workflow declares a generator 'type' not implemented by _resolve_string_generator. Only string_generator_parse_string, string_generator_dynamic_prompts_combinatorial, and string_generator_dynamic_prompts_random are supported in this expansion path.

Source

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

        split_values = _parse_split_values(str(value.get("input", "")), str(value.get("splitOn", ",")))
        return [int(v.strip()) for v in split_values if v.strip()]
    raise UnsupportedWorkflowNodeError(f"Unsupported integer generator type '{generator_type}'")


def _resolve_string_generator(value: Mapping[str, Any]) -> list[str]:
    generator_type = value.get("type")
    if generator_type == "string_generator_parse_string":
        return [v for v in _parse_split_values(str(value.get("input", "")), str(value.get("splitOn", ","))) if v]
    if generator_type == "string_generator_dynamic_prompts_combinatorial":
        generator = CombinatorialPromptGenerator()
        return list(generator.generate(str(value.get("input", "")), max_prompts=int(value.get("maxPrompts", 10))))
    if generator_type == "string_generator_dynamic_prompts_random":
        seed = value.get("seed")
        if seed is None:
            seed = random.randint(0, 2**31 - 1)
        generator = RandomPromptGenerator(seed=int(seed))
        return list(generator.generate(str(value.get("input", "")), num_images=int(value.get("count", 10))))
    raise UnsupportedWorkflowNodeError(f"Unsupported string generator type '{generator_type}'")


def _assert_user_can_access_board(board_id: str, services: Any, user_id: str | None) -> None:
    if not user_id:
        return

    board_records = getattr(services, "board_records", None)
    if board_records is None or not hasattr(board_records, "get"):
        return

    users = getattr(services, "users", None)
    user = users.get(user_id) if users is not None and hasattr(users, "get") else None
    is_admin = bool(user and getattr(user, "is_admin", False))
    if is_admin:
        return

    try:
        board_record = board_records.get(board_id)

View on GitHub (pinned to 0b6a024f2f)

Solutions

  1. Use a supported type: string_generator_parse_string, string_generator_dynamic_prompts_combinatorial, or string_generator_dynamic_prompts_random
  2. Fix the 'type' string in the generator input value
  3. Pre-generate the strings and supply them as a direct list on the string_batch node
  4. Upgrade InvokeAI if the generator type is available in a newer release

Example fix

// before
{ "type": "string_generator_dynamicprompts", "input": "{red|blue}" }
// after
{ "type": "string_generator_dynamic_prompts_combinatorial", "input": "{red|blue}", "maxPrompts": 10 }
Defensive patterns

Strategy: validation

Validate before calling

SUPPORTED_STRING_TYPES = {"string_generator_parse_string", "string_generator_dynamic_prompts_combinatorial", "string_generator_dynamic_prompts_random"}
for node in workflow.get("nodes", []):
    d = node.get("data", {}) if isinstance(node, dict) else {}
    if d.get("type") == "string_generator":
        t = d.get("inputs", {}).get("generator", {}).get("value", {}).get("type")
        if t not in SUPPORTED_STRING_TYPES:
            raise ValueError(f"unsupported string generator type: {t!r}")

Type guard

def is_supported_string_generator(value: object) -> bool:
    return (isinstance(value, dict) and value.get("type") in {
        "string_generator_parse_string",
        "string_generator_dynamic_prompts_combinatorial",
        "string_generator_dynamic_prompts_random"})

Try / catch

try:
    sessions = build_batch_child_workflow_sessions(...)
except UnsupportedWorkflowNodeError as e:
    m = re.search(r"Unsupported string generator type '(.+?)'", str(e))
    if m:
        workflow = expand_strings_client_side(workflow, m.group(1))
        sessions = build_batch_child_workflow_sessions(...)
    else:
        raise

Prevention

When it happens

Trigger: Calling a saved workflow with a string_generator whose inputs.generator.value.type is absent, a typo (e.g. 'string_parser'), or a dynamicprompts variant not supported for child-workflow batch expansion.

Common situations: Hand-edited workflow JSON; workflows exported from newer InvokeAI versions with new string generator kinds; mixing generator config from the batch queue UI into saved child workflows.

Related errors


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