Comfy-Org / Comfy-Org/ComfyUI_frontend
subgraph boundary resolution broken in 3 current workflow templates
- 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?
subgraph boundary resolution is broken due to bugs in either the workflow or the frontend
`compressWidgetInputSlots` removes widget-only input slots from serialized nodes, shrinking the input array. But when `ExecutableNodeDTO.resolveInput` resolves a link from a subgraph's inner IO node back up to the parent SubgraphNode, it does `subgraphNode.inputs.at(link.origin_slot)` using the original slot index from the subgraph definition. That index is now stale because the SubgraphNode's input array was compressed.
when `origin_slot` exceeds the compressed array length, `.at()` returns `undefined`, and the input silently disappears from the prompt output. promoted widget values carried through `proxyWidgets` are also lost because the resolution never reaches them.
### Steps to Reproduce
open and convert to API workflow any of these workflows that come from comfyui-workflow-templates:
- `gsc_starter_2`: SimpleMath+ nodes lose input `a`, KSamplerAdvanced gets `steps=8` (local default) instead of `steps=4` (promoted value)
- `video-wan21_scail`: same SimpleMath+ issue
- `image_flux2_klein_image_edit_9b_distilled`: ReferenceLatent loses `conditioning`, VAEEncode loses `pixels` and `vae`
### 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-10257-subgraph-boundary-resolution-broken-in-3-current-workflow-templates-3276d73d365081199c03cbcdb76c1335) by [Unito](https://www.unito.io)
Contributor guide
Research direction
Start by tracing compressWidgetInputSlots and ExecutableNodeDTO.resolveInput, focusing on how the original origin_slot is used across a subgraph boundary and how proxyWidgets values are propagated. Reproduce the issue by converting gsc_starter_2, video-wan21_scail, and image_flux2_klein_image_edit_9b_distilled to API workflows. Done means boundary inputs and promoted widget values remain present with the expected values instead of disappearing or reverting to defaults.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100