invoke-ai/InvokeAI · error · NodeFieldNotFoundError
Edge destination field {edge.destination.field} does not exi
Error message
Edge destination field {edge.destination.field} does not exist in node {edge.destination.node_id} What it means
NodeFieldNotFoundError is raised when an edge's `destination.field` is not an input field (Pydantic model_fields) of the destination node's type. Dynamic inputs on CallSavedWorkflowInvocation nodes are exempted. The library throws this because writing into a nonexistent input would be silently ignored at execution time.
Source
Thrown at invokeai/app/services/shared/graph.py:1826
source_node = self.nodes.get(edge.source.node_id, None)
if source_node is None:
raise NodeNotFoundError(f"Edge source node {edge.source.node_id} does not exist in the graph")
destination_node = self.nodes.get(edge.destination.node_id, None)
if destination_node is None:
raise NodeNotFoundError(f"Edge destination node {edge.destination.node_id} does not exist in the graph")
if edge.source.field not in source_node.get_output_annotation().model_fields:
raise NodeFieldNotFoundError(
f"Edge source field {edge.source.field} does not exist in node {edge.source.node_id}"
)
if edge.destination.field not in type(destination_node).model_fields:
if isinstance(destination_node, CallSavedWorkflowInvocation) and is_call_saved_workflow_dynamic_input(
edge.destination.field
):
continue
raise NodeFieldNotFoundError(
f"Edge destination field {edge.destination.field} does not exist in node {edge.destination.node_id}"
)
def _validate_graph_is_acyclic(self) -> None:
graph = self.nx_graph_flat()
if not nx.is_directed_acyclic_graph(graph):
raise CyclicalGraphError("Graph contains cycles")
def _validate_edge_type_compatibility(self) -> None:
for edge in self.edges:
destination_node = self.get_node(edge.destination.node_id)
if isinstance(destination_node, CallSavedWorkflowInvocation) and is_call_saved_workflow_dynamic_input(
edge.destination.field
):
continue
if not are_connections_compatible(
self.get_node(edge.source.node_id),
edge.source.field,View on GitHub (pinned to 0b6a024f2f)
Solutions
- Change the edge's destination.field to a real input field of the destination node (check type(destination_node).model_fields)
- Point the edge at a node type that has the desired input field
- Recreate the workflow in the current UI after upgrading InvokeAI
- During workflow migration, remap obsolete input names before validating the graph
Example fix
# before EdgeConnection(node_id="denoise", field="prompt_text") # after EdgeConnection(node_id="denoise", field="prompt") # actual input field
Defensive patterns
Strategy: validation
Validate before calling
def check_edge_destination_fields(graph):
for edge in graph.edges:
dst = graph.nodes.get(edge.destination.node_id)
if dst and edge.destination.field not in type(dst).model_fields:
raise ValueError(f"{edge.destination.node_id} has no input field {edge.destination.field}")
return True
check_edge_destination_fields(graph) Type guard
def is_valid_destination_field(dst, field: str) -> bool:
return field in type(dst).model_fields or (
isinstance(dst, CallSavedWorkflowInvocation)
and is_call_saved_workflow_dynamic_input(field)
) Try / catch
from invokeai.app.services.shared.graph import NodeFieldNotFoundError
try:
validate_graph(graph)
except NodeFieldNotFoundError as e:
logger.error("edge writes to nonexistent input: %s", e) Prevention
- Validate destination field names against type(node).model_fields before wiring edges
- After InvokeAI upgrades, migrate saved workflows and remap renamed inputs
- For dynamic-INPUT workflows, only rely on dynamic fields on CallSavedWorkflowInvocation nodes
When it happens
Trigger: Creating an edge whose destination.field does not match any input field of the destination node type — typos, referencing an input that was renamed/removed in a newer InvokeAI version, or feeding a dynamic-INPUT field on a non-CallSavedWorkflowInvocation node.
Common situations: Saved workflows from older InvokeAI versions whose node inputs changed after an upgrade; hand-edited workflow JSON; programmatic graph construction using guessed field names.
Related errors
- Edge source field {edge.source.field} does not exist in node
- Edge source node {edge.source.node_id} does not exist in the
- Edge destination node {edge.destination.node_id} does not ex
- Node ids must match, got {node_dict_id} and {node.id}
- Destination node {edge.destination.node_id} has already been
AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29).
Data as JSON: /api/errors/8313f9a7ea1489b1.
Report an issue: GitHub.