Warn when a prompt supplies node inputs that match no declared input (currently dropped silently)
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 158
Description
### Problem
Keys in a node's `inputs` that match no declared input are dropped with no
message anywhere — not in the server log, not in the history entry, not in the
saved output metadata. The prompt validates, the job runs, and the result is
simply the unconditioned one.
This is silent by construction rather than by omission. `validate_inputs()`
iterates over the *declared* inputs:
https://github.com/Comfy-Org/ComfyUI/blob/master/execution.py#L896-L898
```python
valid_inputs = set(class_inputs.get('required',{})).union(set(class_inputs.get('optional',{})))
for x in valid_inputs:
```
There is no reverse pass, so `set(inputs) - valid_inputs` is never looked at.
### Why it is worth a line
The failure mode is a correct-looking result. In #15667 I spent seven full
generations on `MiniMaxH3ReferenceToVideo` before noticing that my reference
inputs were never applied: I had written
```json
"ref_audios": {"ref_audio_0": ["20", 0]}
```
instead of the flat dotted form the node actually declares
```json
"ref_audios.ref_audio_0": ["20", 0]
```
Runs with a 5 s reference, a 36 s reference, and no reference at all produced
bit-identical audio. Nothing in the logs distinguished them. That issue was mine
and I closed it — this is the part of it I think still stands.
Anything driving ComfyUI programmatically is exposed to this: a typo, a stale
key after a node's inputs are renamed, or a hand-built graph. The nested form
above is a natural guess precisely because the node's schema groups those inputs.
### Suggestion
After the existing loop, diff the received keys against the declared ones and
log a warning naming them. No behavior change, no error — just breaking the
silence:
```
Node 6 (MiniMaxH3ReferenceToVideo): ignoring unknown input 'ref_audios'
```
Erroring instead of warning would be stricter but would risk breaking graphs
that carry harmless extra keys, so a warning seems the safer default. Happy to
open a PR if the approach sounds right.
Contributor guide
Research direction
Read execution.py around validate_inputs(), especially the loop at lines 896-898, and trace how prompt validation currently handles received inputs. Done means unknown input keys produce a warning naming the node and key while valid prompts and existing behavior remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100