Comfy-Org / Comfy-Org/ComfyUI_frontend

subgraphs with duplicate entries in the link table (two inner links pointing to the same output slot) fail to convert gracefully

Open
#10,258 1 comment 0 reactions 0 assignees View on GitHub
area:subgraph Potential Bug
Dominant language
TypeScript
Stars
2k
Forks
699
Avg merge
1d 7h
Merged PRs (30d)
490

Description

### Prerequisites

- [x] I am running the latest version of ComfyUI
- [ ] I have custom nodes enabled

### What happened?

two templates just have incorrect serialization, they were probably saved from a buggy frontend

when a subgraph output slot has two inner links pointing to it (duplicate entries in the link table), `SubgraphNode.resolveSubgraphOutputLink` fails to resolve the output, returning `undefined`. All downstream nodes that read from that subgraph output lose the connection.

### Steps to Reproduce

Open and save to API any of these workflows from comfyui-workflow-templates:
- `templates-car_product`: 6 SaveVideo/GetVideoComponents nodes lose their `video` input because the subgraph's VIDEO output slot has duplicate links (link IDs 72 and 73 both target output slot 0)
- `templates_rob_kling3_0_multishot_llm_product`: 6 StringToInt nodes lose their `data` input from subgraph node 91

### How is this affecting you?

Crashes ComfyUI completely

### ComfyUI Frontend Version

1.43.1

### Browser

Chrome/Chromium

### Console Errors

```javascript

```

### Logs

```shell

```

### Additional Context

`comfyui-workflow-templates==0.9.27`

┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-10258-subgraphs-with-duplicate-entries-in-the-link-table-two-inner-links-pointing-to-the-s-3276d73d3650816584c6f9145868d807) by [Unito](https://www.unito.io)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.