Subgraphs duplicate inputs and break connections depending on frontend/core versions
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 158
Description
### Custom Node Testing
- [ ] 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
Title: Subgraphs duplicate inputs and break connections depending on frontend/core versions
Hello,
I encountered a serious issue with Subgraphs that appears to be version-dependent. I wanted to share the tests I performed so the behavior can be reproduced more easily.
Problem observed
When converting parts of a workflow into a Subgraph, the following problems occur:
Inputs become duplicated
Existing connections disappear
Internal wiring becomes inconsistent
The Subgraph structure changes unexpectedly after creation
This makes Subgraphs unreliable for building modular workflows.
Tests performed
I ran multiple tests using different combinations of ComfyUI core versions and frontend versions:
ComfyUI 0.17.2 with frontend 1.41.20
Subgraphs consistently broke connections
Inputs were duplicated when creating or editing subgraphs
Forced older frontend (1.39.19)
Issue still occurred when using ComfyUI 0.17.2
Switched to ComfyUI 0.16 with frontend 1.39.19
Creating a new Subgraph from scratch works correctly
No duplicated inputs
Connections remain stable
Loading my original workflow
The subgraph appeared broken, but this was partly due to missing custom nodes
After recreating the subgraph from scratch, it worked correctly in 0.16
Conclusion
From these tests it seems that:
Subgraphs behave correctly in ComfyUI 0.16
The problem appears when using ComfyUI 0.17.x
The frontend version alone does not fully explain the issue
Because Subgraphs are intended to be a core feature for modular workflows, this behavior can significantly impact complex pipelines.
I hope this report helps identify the issue more easily.
Thank you for the great work on ComfyUI.
### Actual Behavior
When converting parts of a workflow into a Subgraph, the node structure becomes inconsistent.
Observed behavior includes:
* Subgraph inputs becoming duplicated
* Existing connections disappearing
* Internal wiring of the subgraph changing unexpectedly
* Subgraph ports being recreated incorrectly
This makes Subgraphs unreliable when building modular workflows.
Through testing it appears that the issue happens in **ComfyUI 0.17.x**, while the same workflow behaves correctly in **ComfyUI 0.16** when using the same frontend version.
Because Subgraphs are intended to modularize workflows, this behavior can break complex pipelines and make existing projects difficult to maintain.
### Steps to Reproduce
1. Open ComfyUI 0.17.x
2. Create a simple workflow with several nodes connected together
3. Select a group of nodes
4. Convert them into a Subgraph
5. Observe the resulting Subgraph
Result:
* Inputs may appear duplicated
* Connections may disappear
* Internal wiring may be inconsistent
Additional testing performed:
* Tested with frontend **1.41.20**
* Forced older frontend **1.39.19**
* Issue still occurs in **ComfyUI 0.17.x**
When switching to **ComfyUI 0.16 with the same frontend**, creating Subgraphs from scratch works correctly and connections remain stable.
### Debug Logs
```powershell
No explicit errors appear in the console when the issue occurs.
ComfyUI launches normally and the problem happens during Subgraph creation and editing.
Test environment:
* ComfyUI versions tested: 0.17.0 and 0.16
* Frontend versions tested: 1.41.20 and 1.39.19
* Windows standalone build
Switching to **ComfyUI 0.16 with frontend 1.39.19** resolves the issue when creating new Subgraphs from scratch.
```
### Other
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.