@@ -6,7 +6,7 @@ import { useNodeImageUpload } from '@/composables/node/useNodeImageUpload'
66import { useValueTransform } from '@/composables/useValueTransform'
77import { t } from '@/i18n'
88import type { ResultItem } from '@/schemas/apiSchema'
9- import type { ComboInputOptions , InputSpec } from '@/schemas/nodeDefSchema'
9+ import type { InputSpec } from '@/schemas/nodeDefSchema'
1010import type { ComfyWidgetConstructor } from '@/scripts/widgets'
1111import { useNodeOutputStore } from '@/stores/imagePreviewStore'
1212import { createAnnotatedPath } from '@/utils/formatUtil'
@@ -33,7 +33,7 @@ export const useImageUploadWidget = () => {
3333 inputName : string ,
3434 inputData : InputSpec
3535 ) => {
36- const inputOptions = ( inputData [ 1 ] ?? { } ) as ComboInputOptions
36+ const inputOptions = inputData [ 1 ] ?? { }
3737 const { imageInputName, allow_batch, image_folder = 'input' } = inputOptions
3838 const nodeOutputStore = useNodeOutputStore ( )
3939
@@ -43,9 +43,11 @@ export const useImageUploadWidget = () => {
4343 const { showPreview } = isVideo ? useNodeVideo ( node ) : useNodeImage ( node )
4444
4545 const fileFilter = isVideo ? isVideoFile : isImageFile
46- const fileComboWidget = findFileComboWidget ( node , imageInputName ?? '' )
46+ // @ts -expect-error InputSpec is not typed correctly
47+ const fileComboWidget = findFileComboWidget ( node , imageInputName )
4748 const initialFile = `${ fileComboWidget . value } `
4849 const formatPath = ( value : InternalFile ) =>
50+ // @ts -expect-error InputSpec is not typed correctly
4951 createAnnotatedPath ( value , { rootFolder : image_folder } )
5052
5153 const transform = ( internalValue : InternalValue ) : ExposedValue => {
@@ -65,6 +67,7 @@ export const useImageUploadWidget = () => {
6567
6668 // Setup file upload handling
6769 const { openFileSelection } = useNodeImageUpload ( node , {
70+ // @ts -expect-error InputSpec is not typed correctly
6871 allow_batch,
6972 fileFilter,
7073 accept,
0 commit comments