diff --git a/src/lib/litegraph/src/widgets/BaseWidget.ts b/src/lib/litegraph/src/widgets/BaseWidget.ts index 1406e0bb79..973e7976da 100644 --- a/src/lib/litegraph/src/widgets/BaseWidget.ts +++ b/src/lib/litegraph/src/widgets/BaseWidget.ts @@ -140,6 +140,9 @@ export abstract class BaseWidget this._state = useWidgetValueStore().registerWidget(graphId, { ...this._state, + // BaseWidget: this.value getter returns this._state.value. So value: this.value === value: this._state.value. + // BaseDOMWidgetImpl: this.value getter returns options.getValue?.() ?? ''. Resolves the correct initial value instead of undefined. + // I.e., calls overriden getter -> options.getValue() -> correct value (https://github.com/Comfy-Org/ComfyUI_frontend/issues/9194). value: this.value, nodeId })