Comfy-Org / Comfy-Org/ComfyUI

Subgraph nodes with duplicate inputs silently drop connected values, causing cryptic missing argument errors

Open
#13,010 2 comments 3 reactions 0 assignees View on GitHub
Potential Bug
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 6h
Merged PRs (30d)
155

Description

### Custom Node Testing

- [x] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)

### Expected Behavior

## Bug: INPUT_IS_LIST nodes fail with missing input argument after loading workflow from video metadata + browser refresh

### ComfyUI version
0.17.2 (commit 4a8cf359)

### Description
When a workflow is loaded from video-embedded metadata and the browser is then refreshed before running, nodes with `INPUT_IS_LIST = True` (specifically `ImageRebatch` / `RebatchImages`) fail with:

```
TypeError: ImageRebatch.rebatch() missing 1 required positional argument: 'images'
```

The input wire is visually connected in the graph. Running the workflow immediately after loading (without refreshing) works correctly.

### Steps to reproduce
1. Load a workflow from video metadata (drag video onto canvas or use Load Image node)
2. Refresh the browser
3. Run the workflow
4. Any `INPUT_IS_LIST` node with connected inputs will fail with a missing argument error

### Expected behavior
Workflow runs correctly after refresh, same as running without refresh.

### Actual behavior
`input_data_all` is missing the input key for `INPUT_IS_LIST` nodes, causing the call to `f(**inputs)` in `_async_map_node_over_list` to fail.

### Root cause hypothesis
The CacheProvider API introduced in `4a8cf359` (re-adding `af7b4a92` after revert) appears to have changed how cached node outputs are resolved and reconstructed for downstream nodes. After a refresh, stale cache entries are partially used to reconstruct `input_data_all`, and list-type inputs are dropped during that reconstruction for `INPUT_IS_LIST` nodes.

This did not occur in previous versions prior to the CacheProvider changes.

### Workaround
Run the workflow immediately after loading from video without refreshing, or manually dirty an upstream node (e.g. change a value and revert it) to force cache invalidation before running.

### Environment
- OS: Linux (Debian)
- GPU: RTX 4070
- Python: 3.13

### Actual Behavior

.

### Steps to Reproduce

.

### Debug Logs

```powershell
.
```

### Other

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the refresh workflow with ImageRebatch/RebatchImages and inspect CacheProvider handling of input_data_all around _async_map_node_over_list. Trace why connected list-type inputs are dropped after cache reconstruction; done means the workflow runs after refresh without missing-argument errors and the regression is covered by an appropriate test.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.