mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-24 08:44:06 +00:00
Don't serialize file upload and video preview widgets (#2689)
This commit is contained in:
@@ -136,7 +136,8 @@ export const useNodeVideo = (node: LGraphNode) => {
|
||||
const hasWidget = node.widgets?.some((w) => w.name === VIDEO_WIDGET_NAME)
|
||||
if (!hasWidget) {
|
||||
node.addDOMWidget(VIDEO_WIDGET_NAME, 'video', container, {
|
||||
hideOnZoom: false
|
||||
hideOnZoom: false,
|
||||
serialize: false
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,12 +76,16 @@ export const useImageUploadWidget = () => {
|
||||
})
|
||||
|
||||
// Create the button widget for selecting the files
|
||||
const uploadWidget = node.addWidget('button', inputName, 'image', () =>
|
||||
openFileSelection()
|
||||
const uploadWidget = node.addWidget(
|
||||
'button',
|
||||
inputName,
|
||||
'image',
|
||||
() => openFileSelection(),
|
||||
{
|
||||
serialize: false
|
||||
}
|
||||
)
|
||||
uploadWidget.label = 'choose file to upload'
|
||||
// @ts-expect-error serialize is not typed
|
||||
uploadWidget.serialize = false
|
||||
|
||||
// TODO: Explain this?
|
||||
// @ts-expect-error LGraphNode.callback is not typed
|
||||
|
||||
Reference in New Issue
Block a user