@@ -113,7 +113,9 @@ export const useLitegraphService = () => {
113113 #addInputSocket( inputSpec : InputSpec ) {
114114 const inputName = inputSpec . name
115115 const nameKey = `${ this . #nodeKey} .inputs.${ normalizeI18nKey ( inputName ) } .name`
116- const widgetConstructor = widgetStore . widgets . get ( inputSpec . type )
116+ const widgetConstructor = widgetStore . widgets . get (
117+ inputSpec . widgetType ?? inputSpec . type
118+ )
117119 if ( widgetConstructor && ! inputSpec . forceInput ) return
118120
119121 this . addInput ( inputName , inputSpec . type , {
@@ -127,9 +129,13 @@ export const useLitegraphService = () => {
127129 * (unless `socketless`), an input socket is also added.
128130 */
129131 #addInputWidget( inputSpec : InputSpec ) {
132+ const widgetInputSpec = { ...inputSpec }
133+ if ( inputSpec . widgetType ) {
134+ widgetInputSpec . type = inputSpec . widgetType
135+ }
130136 const inputName = inputSpec . name
131137 const nameKey = `${ this . #nodeKey} .inputs.${ normalizeI18nKey ( inputName ) } .name`
132- const widgetConstructor = widgetStore . widgets . get ( inputSpec . type )
138+ const widgetConstructor = widgetStore . widgets . get ( widgetInputSpec . type )
133139 if ( ! widgetConstructor || inputSpec . forceInput ) return
134140
135141 const {
@@ -139,7 +145,7 @@ export const useLitegraphService = () => {
139145 } = widgetConstructor (
140146 this ,
141147 inputName ,
142- transformInputSpecV2ToV1 ( inputSpec ) ,
148+ transformInputSpecV2ToV1 ( widgetInputSpec ) ,
143149 app
144150 ) ?? { }
145151
@@ -153,7 +159,7 @@ export const useLitegraphService = () => {
153159 }
154160
155161 if ( ! widget ?. options ?. socketless ) {
156- const inputSpecV1 = transformInputSpecV2ToV1 ( inputSpec )
162+ const inputSpecV1 = transformInputSpecV2ToV1 ( widgetInputSpec )
157163 this . addInput ( inputName , inputSpec . type , {
158164 shape : inputSpec . isOptional ? RenderShape . HollowCircle : undefined ,
159165 localized_name : st ( nameKey , inputName ) ,
0 commit comments