Comfy-Org / Comfy-Org/ComfyUI_frontend

Subgraph Node (Blueprint) promoted widget values not synced back when changed via ContextMenu (combo/model selection)

Open
#11,297 3 comments 0 reactions 0 assignees View on GitHub
area:subgraph area:widgets 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?

Description:
When using a Subgraph Node (e.g., a Blueprint like "Video Generation (LTX-2.3)"), selecting a value from a COMBO widget's ContextMenu (such as ckpt_name, distilled_lora, etc.) does not correctly update the PromotedWidgetView's internal state. The visual display on the node appears to update, but the actual value used during serialization/execution remains the old default value.
Root Cause:
In bindConcretePointerHandlers, when a concrete widget's onClick handler is triggered (e.g., opening a ContextMenu for a COMBO widget), the user's selection updates the concrete widget's value via BaseWidget.setValue(). However, there is no callback mechanism to propagate this value change back to the PromotedWidgetView's _instanceWidgetValues and widgetValueStore.
The data flow is broken at this point:
User clicks COMBO widget on Subgraph Node
→ concrete widget onClick fires
→ ContextMenu opens
→ User selects a value
→ BaseWidget.setValue(newValue) updates concrete widget
→ ❌ PromotedWidgetView._instanceWidgetValues NOT updated
→ ❌ widgetValueStore NOT updated
→ ❌ Serialization uses stale value

### Steps to Reproduce

1. Create or load a workflow with a Subgraph Node (Blueprint), e.g., "Video Generation (LTX-2.3)"
2. The node has promoted COMBO widgets like ckpt_name, distilled_lora, etc.
3. Click on one of these COMBO widgets (e.g., ckpt_name)
4. Select a different model from the dropdown/ContextMenu
5. The widget visually shows the new value on the node
6. Queue the prompt — the old default value is sent to the backend instead of the newly selected value

Expected Behavior
When a user selects a new value from a COMBO widget's ContextMenu on a Subgraph Node, the selected value should be:

Reflected in the visual display ✅ (this works)
Stored in PromotedWidgetView._instanceWidgetValues ❌ (broken)
Stored in widgetValueStore ❌ (broken)
Used during serialization/execution ❌ (broken)

Suggested Fix:
In bindConcretePointerHandlers, wrap the concrete widget's callback so that when its value changes (via ContextMenu selection or any other mechanism), the new value is propagated back to the PromotedWidgetView:
`// In bindConcretePointerHandlers, after setting up the concrete widget:
const originalCallback = concreteWidget.callback;
concreteWidget.callback = (value: any, ...args: any[]) => {
// Call original callback if exists
if (originalCallback) {
originalCallback(value, ...args);
}
// Sync value back to PromotedWidgetView
promotedWidgetView._instanceWidgetValues[widgetName] = value;
widgetValueStore.setValue(nodeId, widgetName, value);
};`
Alternatively, a watch or Object.defineProperty setter on the concrete widget's value property could be used to detect changes and sync them back

### How is this affecting you?

Crashes ComfyUI completely

### ComfyUI Frontend Version

1.38.14+,confirmed still present in v1.44.4

### Browser

Chrome/Chromium

### Console Errors

```javascript

```

### Logs

```shell

```

### Additional Context

_No response_

┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-11297-Subgraph-Node-Blueprint-promoted-widget-values-not-synced-back-when-changed-via-Con-3446d73d3650817d8602c2ba92910b4e) 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.