ComfyUI_frontend icon indicating copy to clipboard operation
ComfyUI_frontend copied to clipboard

fix: persist nested subgraph widget values on save

Open vivekchavan14 opened this issue 3 months ago • 2 comments

Fixes #4930 where nested subgraph input values were not being persisted when saving workflows. The issue occurred because SubgraphNode wasn't enabling widget serialization when it had promoted widgets.

Changes:

  • Enable serialize_widgets when widgets are promoted to SubgraphNode
  • Ensure serialization is enabled during configuration phase
  • Clean up serialization flag when widgets are removed
  • Add comprehensive test coverage for nested subgraph scenarios

This ensures widget values in nested subgraphs persist across save/load cycles, resolving the user-reported issue where values would revert to defaults after reopening workflows.

┆Issue is synchronized with this Notion page by Unito

vivekchavan14 avatar Aug 12 '25 14:08 vivekchavan14