Comfy-Org/ComfyUI · error · NodeInputError

Node {to_node_id} says it needs input {to_input}, but there

Error message

Node {to_node_id} says it needs input {to_input}, but there is no input to that node at all

What it means

Raised as NodeInputError by TopologicalSort.make_input_strong_link() in comfy_execution/graph.py when execution is told to make a strong dependency on an input that does not exist in the target node's 'inputs' dict at all. Strong links are established when a node's CHECK_REQUIREMENTS or lazy-input resolution declares it depends on an upstream output; the code path is driven from execution.py where make_input_strong_link(unique_id, i) is called with input names reported by the node class itself.

Source

Thrown at comfy_execution/graph.py:123

class TopologicalSort:
    def __init__(self, dynprompt):
        self.dynprompt = dynprompt
        self.pendingNodes = {}
        self.blockCount = {} # Number of nodes this node is directly blocked by
        self.blocking = {} # Which nodes are blocked by this node
        self.externalBlocks = 0
        self.unblockedEvent = asyncio.Event()

    def get_input_info(self, unique_id, input_name):
        class_type = self.dynprompt.get_node(unique_id)["class_type"]
        class_def = nodes.NODE_CLASS_MAPPINGS[class_type]
        return get_input_info(class_def, input_name)

    def make_input_strong_link(self, to_node_id, to_input):
        inputs = self.dynprompt.get_node(to_node_id)["inputs"]
        if to_input not in inputs:
            raise NodeInputError(f"Node {to_node_id} says it needs input {to_input}, but there is no input to that node at all")
        value = inputs[to_input]
        if not is_link(value):
            raise NodeInputError(f"Node {to_node_id} says it needs input {to_input}, but that value is a constant")
        from_node_id, from_socket = value
        self.add_strong_link(from_node_id, from_socket, to_node_id)

    def add_strong_link(self, from_node_id, from_socket, to_node_id):
        if not self.is_cached(from_node_id):
            self.add_node(from_node_id)
            if to_node_id not in self.blocking[from_node_id]:
                self.blocking[from_node_id][to_node_id] = {}
                self.blockCount[to_node_id] += 1
            self.blocking[from_node_id][to_node_id][from_socket] = True

    def add_node(self, node_unique_id, include_lazy=False, subgraph_nodes=None):
        node_ids = [node_unique_id]
        links = []

View on GitHub (pinned to 1c6d8d45b3)

Solutions

  1. Update the workflow: re-add the node fresh from the menu so its inputs dict contains every declared input, then reconnect links.
  2. If you own the node code, make CHECK_REQUIREMENTS/lazy-input reporting use the same literal names as INPUT_TYPES and validate against the actual inputs present.
  3. For API prompts, include the reported input key (even with a null/empty value) in the node's inputs dict.
  4. Update the custom node pack — the name mismatch may be a known bug fixed upstream.

Example fix

# before (custom node reports a dependency its instances don't have)
class MyNode:
    @classmethod
    def CHECK_REQUIREMENTS(cls, inputs, outputs):
        return [ChangeNodeRequirements('vae')]  # but 'vae' missing from prompt inputs

# after: only require inputs that exist, and keep names in sync
    @classmethod
    def CHECK_REQUIREMENTS(cls, inputs, outputs):
        return [] if 'vae' not in inputs else [ChangeNodeRequirements('vae')]
Defensive patterns

Strategy: validation

Validate before calling

# before triggering strong-link logic, confirm the input key exists
node_inputs = prompt[to_node_id]['inputs']
assert to_input in node_inputs, f'{to_node_id} lacks input {to_input!r}'

Try / catch

from comfy_execution.graph import NodeInputError
try:
    execution_list.make_input_strong_link(nid, name)
except NodeInputError as e:
    logging.warning('skipping strong link: %s', e)

Prevention

When it happens

Trigger: A custom node's CHECK_REQUIREMENTS or input-resolution returns an input name that is not a key of the node's prompt 'inputs' (e.g. reports 'vae' when the workflow instance lacks that key), or the prompt dict for that node was hand-built with missing input keys. The mismatch between declared dependency and actual prompt data triggers this at queue time.

Common situations: Custom-node authors renaming an input but not updating every place the name is reported; workflows where an optional input was stripped from the serialized inputs dict; hand-crafted API prompts omitting optional keys that the node then declares as a dependency; or version skew between a node pack and a workflow saved with an older input set.

Related errors


AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14). Data as JSON: /api/errors/d7306d7fab29ddae. Report an issue: GitHub.