invoke-ai/InvokeAI · error · ValueError

Invalid call_saved_workflow dynamic input field '${field_nam

Error message

Invalid call_saved_workflow dynamic input field '${field_name}'

What it means

parse_call_saved_workflow_dynamic_input() raises this ValueError when the field name has the dynamic prefix but its remainder does not split on '::' into a non-empty node_id and input_field_name (rpartition returns no separator or empty parts). The encoded identifier is malformed.

Source

Thrown at invokeai/app/invocations/call_saved_workflow.py:23

from invokeai.app.invocations.workflow_return import WorkflowReturnOutput
from invokeai.app.services.shared.invocation_context import InvocationContext
from invokeai.app.services.workflow_records.workflow_records_common import WorkflowCategory, WorkflowNotFoundError

CALL_SAVED_WORKFLOW_DYNAMIC_FIELD_PREFIX = "saved_workflow_input::"


def is_call_saved_workflow_dynamic_input(field_name: str) -> bool:
    return field_name.startswith(CALL_SAVED_WORKFLOW_DYNAMIC_FIELD_PREFIX)


def parse_call_saved_workflow_dynamic_input(field_name: str) -> tuple[str, str]:
    if not is_call_saved_workflow_dynamic_input(field_name):
        raise ValueError(f"'{field_name}' is not a call_saved_workflow dynamic input field")

    raw_identifier = field_name.removeprefix(CALL_SAVED_WORKFLOW_DYNAMIC_FIELD_PREFIX)
    node_id, separator, input_field_name = raw_identifier.rpartition("::")
    if not separator or not node_id or not input_field_name:
        raise ValueError(f"Invalid call_saved_workflow dynamic input field '{field_name}'")

    return node_id, input_field_name


@invocation(
    "call_saved_workflow",
    title="Call Saved Workflow",
    tags=["workflow", "saved", "library"],
    category="workflow",
    version="1.0.0",
    use_cache=False,
    classification=Classification.Beta,
)
class CallSavedWorkflowInvocation(BaseInvocation):
    """Displays and later executes against a selected saved workflow."""

    workflow_id: str = InputField(
        default="",

View on GitHub (pinned to 0b6a024f2f)

Solutions

  1. Build dynamic field names as PREFIX + node_id + '::' + input_field_name, ensuring both parts are non-empty.
  2. Validate the generated field name with is_call_saved_workflow_dynamic_input and a '::' split check before use.
  3. Re-export/re-save the corrupted workflow from the workflow editor to regenerate correct field names.

Example fix

// before
name = PREFIX + node_id + ":" + field_name  # wrong separator

// after
name = f"{PREFIX}{node_id}::{field_name}"  # both parts non-empty, '::' separator
Defensive patterns

Strategy: validation

Validate before calling

raw = field_name.removeprefix(PREFIX)
node_id, sep, input_field = raw.rpartition("::")
assert sep and node_id and input_field, f"malformed dynamic field: {field_name!r}"

Type guard

def is_well_formed_dynamic_input(field_name: str) -> bool:
    if not field_name.startswith(PREFIX):
        return False
    node_id, sep, input_field = field_name.removeprefix(PREFIX).rpartition("::")
    return bool(sep and node_id and input_field)

Try / catch

try:
    node_id, field = parse_call_saved_workflow_dynamic_input(field_name)
except ValueError:
    logger.warning("malformed dynamic field %r", field_name)

Prevention

When it happens

Trigger: A dynamic field like 'prefix_nodeid_without_separator' or 'prefix_::' or 'prefix_node::' — the prefix is present but the node_id and/or input field name part is empty or the '::' separator is missing.

Common situations: Custom code building dynamic field names with wrong join token (e.g. single ':' or '.'); manual editing of saved workflows corrupting the encoded identifier; downstream node IDs or field names being empty strings when the field name was generated.

Related errors


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