From 609496957b77b17eb2b8dc02add27ab5fe576672 Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Wed, 9 Apr 2025 11:36:35 -0400 Subject: [PATCH] [Cleanup] Remove WidgetOptions.forceInput (#3362) --- src/extensions/core/widgetInputs.ts | 3 +-- src/services/litegraphService.ts | 1 - src/types/litegraph-augmentation.d.ts | 4 ---- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/extensions/core/widgetInputs.ts b/src/extensions/core/widgetInputs.ts index aecfae7317..56f927d181 100644 --- a/src/extensions/core/widgetInputs.ts +++ b/src/extensions/core/widgetInputs.ts @@ -433,8 +433,7 @@ function getConfig(this: LGraphNode, widgetName: string) { function isConvertibleWidget(widget: IWidget, config: InputSpec): boolean { return ( // @ts-expect-error InputSpec is not typed correctly - (VALID_TYPES.includes(widget.type) || VALID_TYPES.includes(config[0])) && - !widget.options?.forceInput + VALID_TYPES.includes(widget.type) || VALID_TYPES.includes(config[0]) ) } diff --git a/src/services/litegraphService.ts b/src/services/litegraphService.ts index 0b8a7922ea..5754c47042 100644 --- a/src/services/litegraphService.ts +++ b/src/services/litegraphService.ts @@ -147,7 +147,6 @@ export const useLitegraphService = () => { widget.label = st(nameKey, widget.label ?? inputName) widget.options ??= {} Object.assign(widget.options, { - forceInput: inputSpec.forceInput, advanced: inputSpec.advanced, hidden: inputSpec.hidden }) diff --git a/src/types/litegraph-augmentation.d.ts b/src/types/litegraph-augmentation.d.ts index bc0f74aed8..e173c1b3de 100644 --- a/src/types/litegraph-augmentation.d.ts +++ b/src/types/litegraph-augmentation.d.ts @@ -26,10 +26,6 @@ declare module '@comfyorg/litegraph/dist/types/widgets' { * The minimum size of the node if the widget is present. */ minNodeSize?: Size - /** - * Whether the widget is forced to be an input. - */ - forceInput?: boolean /** * Whether the widget defaults to input state. Can still be converted back * to widget state.