-
Notifications
You must be signed in to change notification settings - Fork 344
Description
Custom Node Testing
☑️ I have tried disabling custom nodes and the issue persists
Frontend Version
1.25.2
Expected Behavior
When selecting output nodes inside a subgraph and clicking the execute button in the selection toolbox, the partial execution should work correctly, executing only the selected nodes and their dependencies within the subgraph context.
Actual Behavior
execute-subgraph.mov
When using the execute button on selected nodes while inside a subgraph, it throws an error. The error toast displays:
"cannot read properties of undefined (reading 'inputs')"
Steps to Reproduce
- Create a workflow with a subgraph node
- Enter the subgraph (double-click or right-click → "Enter Subgraph")
- Add some nodes inside the subgraph, including at least one output node (e.g., SaveImage)
- Select one or more output nodes inside the subgraph
- Click the execute button (play icon) in the selection toolbox
- Observe the error toast message
Debug Logs
The error occurs in the browser, no terminal logs are generated for this issue.
Browser Logs
TypeError: Cannot read properties of undefined (reading 'inputs')
at recursiveAddNodes (executionUtil.ts:37)
at recursiveAddNodes (executionUtil.ts:39)
at graphToPrompt (executionUtil.ts:187)
Setting JSON
Using default settings. The issue is reproducible with a fresh ComfyUI installation.
What browsers do you use to access the UI?
- Google Chrome
- Mozilla Firefox
Other Information
Related Code Locations
src/utils/executionUtil.ts
-recursiveAddNodes()
function (line 28-44)src/components/graph/selectionToolbox/ExecuteButton.vue
- UI componentsrc/composables/useCoreCommands.ts
-Comfy.QueueSelectedOutputNodes
command
The issue stems from the partial execution system not properly handling the hierarchical node ID structure used in subgraphs.
Root Cause Analysis
The issue appears to be in the function in . When executing from within a subgraph, the function tries to traverse node inputs but encounters undefined nodes because the node IDs in the subgraph context don't match those in the root graph's output object.
The partial execution system currently assumes all nodes are in the root graph context, but when inside a subgraph, nodes have different execution IDs that follow a hierarchical format (e.g., "parentId:subgraphId:nodeId").
┆Issue is synchronized with this Notion page by Unito